This commit is contained in:
Jordi Enric
2024-03-31 18:56:47 +02:00
parent 6f1eb0b75e
commit ee7c3e5835
2 changed files with 7 additions and 7 deletions
@@ -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)
+6 -6
View File
@@ -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,