Skip to content

Commit

Permalink
Auto-format code
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 27, 2024
1 parent b35f1a6 commit edf7b35
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
11 changes: 7 additions & 4 deletions src/routes/calendar/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { HttpStatusCode } from "elysia-http-status-code";
import { client } from "index";
import { normalDateToCustomDateTime } from "utils/dates/customAndNormal";
import { promiseResult } from "utils/errors";
import { replaceDateDeep, replaceDateWithTimestamp } from "utils/objects/transform";
import {
replaceDateDeep,
replaceDateWithTimestamp,
} from "utils/objects/transform";
import { responseBuilder } from "utils/response";

export const specificCalendar = new Elysia()
Expand All @@ -22,7 +25,7 @@ export const specificCalendar = new Elysia()
summary: true,
class: () => ({
name: true,
school: () => ({ name: true })
school: () => ({ name: true }),
}),
updates: () => ({
user: () => ({ username: true, displayname: true }),
Expand Down Expand Up @@ -54,6 +57,6 @@ export const specificCalendar = new Elysia()
data: {
...replaceDateDeep(result.data, normalDateToCustomDateTime),
updates: result.data.updates.map(replaceDateWithTimestamp),
}
},
});
})
});
2 changes: 1 addition & 1 deletion src/routes/calendar/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Elysia from "elysia";
import { specificCalendar } from "routes/calendar/id";
import { createCalendar } from "./create";
import { deleteCalendar } from "./delete";
import { listCalendar } from "./list";
import { updateCalendar } from "./update";
import { specificCalendar } from "routes/calendar/id";

export const calendarRouter = new Elysia({ prefix: "/calendar" })
.use(listCalendar)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/calendar/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const listCalendar = new Elysia().use(HttpStatusCode()).get(
summary: true,
class: () => ({
name: true,
school: () => ({ name: true })
school: () => ({ name: true }),
}),
updates: () => ({
user: () => ({ username: true, displayname: true }),
Expand Down
2 changes: 1 addition & 1 deletion src/routes/notes/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const createNote = new Elysia()
set.status = httpStatus.HTTP_201_CREATED;
return responseBuilder("success", {
message: "Successfully created note",
data: result.data
data: result.data,
});
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/routes/notes/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Elysia from "elysia";
import { createNote } from "./create";
import { deleteNote } from "./delete";
import { specificNote } from "./id";
import { listNotes } from "./list";
import { updateNote } from "./update";
import { specificNote } from "./id";

export const noteRouter = new Elysia({ prefix: "/notes" })
.use(createNote)
Expand Down
4 changes: 2 additions & 2 deletions src/utils/dates/customAndNormal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const normalDateToCustomDateTime = (date: Date) => {
const day = date.getDate();
const month = date.getMonth() + 1;
const year = date.getFullYear();
const hour = date.getHours()
const min = date.getMinutes()
const hour = date.getHours();
const min = date.getMinutes();

return { day, month, year, hour, min };
};
Expand Down

0 comments on commit edf7b35

Please sign in to comment.