File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
server/api/users/[userId]/notifications Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ export default defineEventHandler(async (event) => {
99 const queryRestrict = { user_id : userId }
1010 const { updateNotificationById } = useNotificationCrud ( queryRestrict )
1111
12- const body = await readValidatedBody ( event , createInsertSchema ( sysNotificationTable ) . partial ( ) . parse )
12+ const body = await readBody ( event )
1313
1414 if ( body && body . read_at ) {
1515 body . read_at = new Date ( body . read_at )
1616 }
1717
18- const data = await updateNotificationById ( notificationUId , body )
18+ const validatedBody = createInsertSchema ( sysNotificationTable ) . partial ( ) . parse ( body )
19+
20+ const data = await updateNotificationById ( notificationUId , validatedBody )
1921
2022 setResponseStatus ( event , 200 )
2123
You can’t perform that action at this time.
0 commit comments