Skip to content

Commit ee99cf6

Browse files
dawangkgithub-actions[bot]
authored andcommitted
Auto-formatted the code using Prettier
1 parent ac7adb7 commit ee99cf6

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed

course-matrix/frontend/src/api/timetableApiSlice.ts

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
1-
import {apiSlice} from './baseApiSlice';
2-
import {TIMETABLES_URL} from './config';
1+
import { apiSlice } from "./baseApiSlice";
2+
import { TIMETABLES_URL } from "./config";
33

44
// Endpoints for /api/timetables
55
export const timetableApiSlice = apiSlice.injectEndpoints({
66
endpoints: (builder) => ({
77
createTimetable: builder.mutation({
88
query: (data) => ({
99
url: `${TIMETABLES_URL}`,
10-
method: 'POST',
10+
method: "POST",
1111
headers: {
12-
'Content-Type': 'application/json',
13-
Accept: 'application/json, text/plain, */*',
12+
"Content-Type": "application/json",
13+
Accept: "application/json, text/plain, */*",
1414
},
1515
body: data,
16-
credentials: 'include',
16+
credentials: "include",
1717
}),
18-
invalidatesTags: ['Timetable'],
18+
invalidatesTags: ["Timetable"],
1919
}),
2020
getTimetables: builder.query<unknown, void>({
2121
query: () => ({
2222
url: `${TIMETABLES_URL}`,
23-
method: 'GET',
23+
method: "GET",
2424
headers: {
25-
'Content-Type': 'application/json',
26-
Accept: 'application/json, text/plain, */*',
25+
"Content-Type": "application/json",
26+
Accept: "application/json, text/plain, */*",
2727
},
28-
providesTags: ['Timetable'],
29-
credentials: 'include',
28+
providesTags: ["Timetable"],
29+
credentials: "include",
3030
}),
3131
keepUnusedDataFor: 0,
3232
}),
33-
getTimetable: builder.query<unknown, string|number>({
33+
getTimetable: builder.query<unknown, string | number>({
3434
query: (id) => ({
3535
url: `${TIMETABLES_URL}/${id}`,
36-
method: 'GET',
36+
method: "GET",
3737
headers: {
38-
'Content-Type': 'application/json',
39-
Accept: 'application/json, text/plain, */*',
38+
"Content-Type": "application/json",
39+
Accept: "application/json, text/plain, */*",
4040
},
41-
credentials: 'include',
41+
credentials: "include",
4242
}),
43-
keepUnusedDataFor: 0
43+
keepUnusedDataFor: 0,
4444
}),
4545
updateTimetable: builder.mutation({
4646
query: (data) => ({
4747
url: `${TIMETABLES_URL}/${data.id}`,
48-
method: 'PUT',
48+
method: "PUT",
4949
headers: {
50-
'Content-Type': 'application/json',
51-
Accept: 'application/json, text/plain, */*',
50+
"Content-Type": "application/json",
51+
Accept: "application/json, text/plain, */*",
5252
},
5353
body: data,
54-
credentials: 'include',
54+
credentials: "include",
5555
}),
56-
invalidatesTags: ['Timetable'],
56+
invalidatesTags: ["Timetable"],
5757
}),
5858
deleteTimetable: builder.mutation({
5959
query: (id) => ({
6060
url: `${TIMETABLES_URL}/${id}`,
61-
method: 'DELETE',
61+
method: "DELETE",
6262
headers: {
63-
'Content-Type': 'application/json',
64-
Accept: 'application/json, text/plain, */*',
63+
"Content-Type": "application/json",
64+
Accept: "application/json, text/plain, */*",
6565
},
66-
credentials: 'include',
66+
credentials: "include",
6767
}),
68-
invalidatesTags: ['Timetable'],
68+
invalidatesTags: ["Timetable"],
6969
}),
7070
generateTimetable: builder.mutation({
7171
query: (data) => ({
7272
url: `${TIMETABLES_URL}/generate`,
73-
method: 'POST',
73+
method: "POST",
7474
headers: {
75-
'Content-Type': 'application/json',
76-
Accept: 'application/json, text/plain, */*',
75+
"Content-Type": "application/json",
76+
Accept: "application/json, text/plain, */*",
7777
},
7878
body: data,
79-
credentials: 'include',
79+
credentials: "include",
8080
}),
8181
}),
8282
}),

course-matrix/frontend/src/pages/Home/TimetableCard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,10 @@ const TimetableCard = ({
122122
} `}
123123
onClick={() => handleFavourite()}
124124
/>
125-
125+
126126
<div className="flex justify-around">
127127
{!isEditingTitle && (
128128
<>
129-
130129
<Button
131130
size="sm"
132131
variant="ghost"

0 commit comments

Comments
 (0)