Leaflet Blog in Deno Fresh

Update api.ts

Changed files
+3 -3
lib
+3 -3
lib/api.ts
···
return posts.data.records.filter(
drafts,
) as (ComAtprotoRepoListRecords.Record & {
-
value: ComWhtwndBlogEntry.Record;
+
value: ComWhtwndBlogEntry.Main;
})[];
}
function drafts(record: ComAtprotoRepoListRecords.Record) {
if (Deno.env.get("NODE_ENV") === "development") return true;
-
const post = record.value as ComWhtwndBlogEntry.Record;
+
const post = record.value as ComWhtwndBlogEntry.Main;
return post.visibility === "public";
}
···
});
return post.data as ComAtprotoRepoListRecords.Record & {
-
value: ComWhtwndBlogEntry.Record;
+
value: ComWhtwndBlogEntry.Main;
};
}