Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User API 경로 정리 #777

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading