Skip to content

Commit

Permalink
User API 경로 정리 (#777)
Browse files Browse the repository at this point in the history
* refactor: 400번대 에러 반환 제거

* refactor: overDueDay 반환 값에서 제거
  • Loading branch information
nyj001012 authored Oct 23, 2023
1 parent c5bd7ae commit cf970dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 6 additions & 6 deletions backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ app.use(
// dev route
app.use('/api', router);

// dev/v2 route
createExpressEndpoints(contract, routerV2, app, {
logInitialization: true,
responseValidation: true,
jsonQuery: true,
});
// // dev/v2 route
// createExpressEndpoints(contract, routerV2, app, {
// logInitialization: true,
// responseValidation: true,
// jsonQuery: true,
// });

// 에러 핸들러
app.use(errorConverter);
Expand Down
6 changes: 0 additions & 6 deletions contracts/src/users/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const lendingSchema = z
.string()
.describe('반납 예정 날짜')
.openapi({ example: '2023-08-22T20:20:55.000Z' }),
overDueDay: nonNegativeInt.describe('연체된 날 수').openapi({ example: 0 }),
reservedNum: z.string().describe('예약된 수').openapi({ example: '0' }),
})
.optional();
Expand All @@ -67,11 +66,6 @@ const searchUserResponseItemSchema = z.object({
.optional()
.describe('연체 패널티 끝나는 날짜')
.openapi({ example: '2022-05-22' }),
overDueDay: z.coerce
.string()
.default('0')
.describe('현재 연체된 날 수')
.openapi({ example: '0' }),
role: nonNegativeInt.describe('유저 권한').openapi({ example: 2 }),
reservations: z.array(reservationSchema).describe('해당 유저의 예약 정보'),
lendings: z.array(lendingSchema).describe('해당 유저의 대출 정보'),
Expand Down

0 comments on commit cf970dd

Please sign in to comment.