Skip to content

Commit a5834f3

Browse files
v0.5.6 - Fixed a issue that prevented to save a board when no image was
provided
1 parent 4d8b254 commit a5834f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/pages/board/[id].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ const saveBoard = async () => {
538538
userId: userID,
539539
name: newName,
540540
style: newBoardStyle.value,
541-
image: newBoardImage.value,
541+
image: newBoardImage.value ? newBoardImage.value : null,
542542
status: newBoardStatus.value,
543543
},
544544
});

server/api/data/board.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ export default defineEventHandler(async (event) => {
102102
// Get the board data from the request body
103103
const { id, userId, name, style, image, status } = await readBody(event);
104104

105-
if (!userId || !name || !style || !image || !status) {
105+
if (!userId || !name || !style || !status) {
106106
event.res.statusCode = 400;
107107
return {
108-
error: "User ID, name, style, image and status are required",
108+
error: "User ID, name, style and status are required",
109109
};
110110
}
111111

0 commit comments

Comments
 (0)