Skip to content

Commit

Permalink
fix: /time POST 요청값에서 id와 dayOfWeek 필드 삭제, month와 day에서 padStart 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
simeunseo committed Jul 3, 2024
1 parent 89a4e6c commit 5252f89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/pages/selectSchedule/utils/changeApiReq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ export const transformHostScheduleType = (
if (!matchedResult) {
return null; // Handle the case when there is no match for the date pattern
}
const [, month, day, dateOfWeek] = matchedResult;
const [, month, day, ,] = matchedResult;

return {
id: item.id.toString(),
month: month.padStart(2, '0'),
day: day.padStart(2, '0'),
dayOfWeek: dateOfWeek,
month: month,
day: day,
startTime: item.startTime,
endTime: item.endTime,
priority: item.priority,
Expand Down
2 changes: 0 additions & 2 deletions src/types/createAvailableSchduleType.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export interface HostAvailableSchduleRequestType {
id: string;
month: string;
day: string;
dayOfWeek: string;
startTime: string;
endTime: string;
priority: number;
Expand Down

0 comments on commit 5252f89

Please sign in to comment.