Add CMS termine editor for admin and vorstand
This commit is contained in:
@@ -39,7 +39,7 @@ const news_post = defineEventHandler(async (event) => {
|
||||
});
|
||||
}
|
||||
const body = await readBody(event);
|
||||
const { id, title, content } = body;
|
||||
const { id, title, content, isPublic } = body;
|
||||
if (!title || !content) {
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
@@ -50,6 +50,7 @@ const news_post = defineEventHandler(async (event) => {
|
||||
id: id || void 0,
|
||||
title,
|
||||
content,
|
||||
isPublic: isPublic || false,
|
||||
author: user.name
|
||||
});
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user