mirror of
https://github.com/jordienr/zenblog.git
synced 2026-09-28 01:56:07 -04:00
wip
This commit is contained in:
@@ -19,7 +19,7 @@ export default async function handler(
|
||||
const postPromise = db
|
||||
.from("posts")
|
||||
.select(
|
||||
"slug, title, content, cover_image, created_at, updated_at, metadata"
|
||||
"slug, title, content, cover_image, published_at, created_at, updated_at, metadata"
|
||||
)
|
||||
.eq("blog_id", blogId)
|
||||
.eq("published", true)
|
||||
|
||||
@@ -37,7 +37,7 @@ export type Post = {
|
||||
};
|
||||
|
||||
export type PostWithContent = Post & {
|
||||
content: string;
|
||||
content: any;
|
||||
};
|
||||
|
||||
export type CreateClientOpts = {
|
||||
@@ -60,11 +60,11 @@ export function createClient<T>({ blogId, _url, debug }: CreateClientOpts) {
|
||||
const res = await fetch(URL, opts);
|
||||
const json = await res.json();
|
||||
|
||||
// if (res.headers.get("zenblog-subscription-status") === "inactive") {
|
||||
// throwError(
|
||||
// "Zenblog subscription is inactive. Go to https://zenblog.com to subscribe."
|
||||
// );
|
||||
// }
|
||||
if (res.headers.get("zenblog-subscription-status") === "inactive") {
|
||||
throwError(
|
||||
"Zenblog subscription is inactive. Go to https://zenblog.com to subscribe."
|
||||
);
|
||||
}
|
||||
log("res", {
|
||||
status: res.status,
|
||||
statusText: res.statusText,
|
||||
|
||||
Reference in New Issue
Block a user