mirror of
https://github.com/jordienr/zenblog.git
synced 2026-09-26 17:20:26 -04:00
wip
This commit is contained in:
@@ -17,6 +17,11 @@ export default function CreatePost() {
|
||||
onSave={async (content) => {
|
||||
const { tags, ...post } = content;
|
||||
try {
|
||||
console.log("category", post.category_id);
|
||||
if (post.category_id === 0) {
|
||||
// remove category_id from post
|
||||
delete post.category_id;
|
||||
}
|
||||
const { data, error } = await supa
|
||||
.from("posts")
|
||||
.insert({ ...post, blog_id: blogId })
|
||||
|
||||
Reference in New Issue
Block a user