Skip to content

Commit

Permalink
refactor(time): rename endpoint object attributes to upper snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
SWARVY committed Aug 18, 2024
1 parent 23ea19d commit 290fb41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions apps/time/src/widgets/time-table/api/endpoint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const TIMETABLE_ENDPOINT = {
lectureList: 'v1/lecture/retrieve',
majorList: 'v1/lecture/retrieve/major',
};
LECTURE_LIST: 'v1/lecture/retrieve',
MAJOR_LIST: 'v1/lecture/retrieve/major',
} as const;

export default TIMETABLE_ENDPOINT;
2 changes: 1 addition & 1 deletion apps/time/src/widgets/time-table/api/getLectureList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface GetLectureListResponse {
export async function getLectureList({
...params
}: GetLectureListParams): Promise<GetLectureListResponse> {
const apiURL = getAPIURL(TIMETABLE_ENDPOINT.lectureList);
const apiURL = getAPIURL(TIMETABLE_ENDPOINT.LECTURE_LIST);

Object.entries(params).forEach(([key, value]) => {
if (value) {
Expand Down
2 changes: 1 addition & 1 deletion apps/time/src/widgets/time-table/api/getMajorList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface GetMajorListResponse {
export async function getMajorList({
major,
}: GetMajorListParams): Promise<GetMajorListResponse> {
const apiURL = getAPIURL(TIMETABLE_ENDPOINT.majorList);
const apiURL = getAPIURL(TIMETABLE_ENDPOINT.MAJOR_LIST);

apiURL.searchParams.set('major', major);

Expand Down

0 comments on commit 290fb41

Please sign in to comment.