style: format code
This commit is contained in:
parent
17392b3aa4
commit
7b1a9acd33
7 changed files with 33 additions and 13 deletions
|
@ -357,7 +357,14 @@ export const PATCH = auth(async (req, { params }) => {
|
|||
|
||||
const { title, description, start_time, end_time, location, status } = body;
|
||||
|
||||
if (!title && !description && !start_time && !end_time && !location && !status) {
|
||||
if (
|
||||
!title &&
|
||||
!description &&
|
||||
!start_time &&
|
||||
!end_time &&
|
||||
!location &&
|
||||
!status
|
||||
) {
|
||||
return NextResponse.json(
|
||||
{ success: false, message: 'No fields to update' },
|
||||
{ status: 400 },
|
||||
|
@ -406,5 +413,8 @@ export const PATCH = auth(async (req, { params }) => {
|
|||
data: updateData,
|
||||
});
|
||||
|
||||
return NextResponse.json({ success: true, event: updatedEvent }, { status: 200 });
|
||||
return NextResponse.json(
|
||||
{ success: true, event: updatedEvent },
|
||||
{ status: 200 },
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue