Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Chew committed Sep 29, 2023
1 parent 8dc0e52 commit 5b13947
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/admin/home/create-event-popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const mutation = useMutation({
const newEventId = ref('')
async function createEvent() {
event.startDateTime = (new Date(event.startDateTime).getTime()/1000).toString()
event.endDateTime = (new Date(event.endDateTime).getTime()/1000).toString()
event.startDateTime = (new Date(event.startDateTime).getTime() / 1000).toString()
event.endDateTime = (new Date(event.endDateTime).getTime() / 1000).toString()
const res = await mutation.mutateAsync(event)
newEventId.value = res.id
Expand Down
8 changes: 4 additions & 4 deletions components/admin/home/update-event-popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ watch(props, () => {
updatedValues.endDateTime = dayjs(Number.parseInt(props.event.endDateTime) * 1000).format('YYYY-MM-DDTHH:mm')
})
async function updateEvent() {
mutation.mutate(props.event.id)
}
const mutation = useMutation({
mutationFn: (id: string) => $api(`/api/event/${id}` as '/api/event/:id', {
method: 'PUT',
}),
})
async function updateEvent() {
mutation.mutate(props.event.id)
}
</script>

<template>
Expand Down
1 change: 0 additions & 1 deletion server/utils/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export function defineProtectedEventHandler<T extends EventHandlerRequest, D>(
})
}


if (options.restrictTo) {
if (!user?.memberType || !options.restrictTo.includes(user.memberType)) {
throw createError({
Expand Down

0 comments on commit 5b13947

Please sign in to comment.