tangled
alpha
login
or
join now
knotbin.com
/
blog
0
fork
atom
Leaflet Blog in Deno Fresh
0
fork
atom
overview
issues
pulls
pipelines
Update api.ts
knotbin.com
10 months ago
e68f382c
039540b7
+3
-3
1 changed file
expand all
collapse all
unified
split
lib
api.ts
+3
-3
lib/api.ts
···
15
return posts.data.records.filter(
16
drafts,
17
) as (ComAtprotoRepoListRecords.Record & {
18
-
value: ComWhtwndBlogEntry.Record;
19
})[];
20
}
21
22
function drafts(record: ComAtprotoRepoListRecords.Record) {
23
if (Deno.env.get("NODE_ENV") === "development") return true;
24
-
const post = record.value as ComWhtwndBlogEntry.Record;
25
return post.visibility === "public";
26
}
27
···
35
});
36
37
return post.data as ComAtprotoRepoListRecords.Record & {
38
-
value: ComWhtwndBlogEntry.Record;
39
};
40
}
···
15
return posts.data.records.filter(
16
drafts,
17
) as (ComAtprotoRepoListRecords.Record & {
18
+
value: ComWhtwndBlogEntry.Main;
19
})[];
20
}
21
22
function drafts(record: ComAtprotoRepoListRecords.Record) {
23
if (Deno.env.get("NODE_ENV") === "development") return true;
24
+
const post = record.value as ComWhtwndBlogEntry.Main;
25
return post.visibility === "public";
26
}
27
···
35
});
36
37
return post.data as ComAtprotoRepoListRecords.Record & {
38
+
value: ComWhtwndBlogEntry.Main;
39
};
40
}