- src/utils/transaction.js: withTransaction 헬퍼 함수 추가 - src/schemas/: 도메인별 스키마 파일 분리 (common, album, schedule, admin, member, auth) - 라우트에 JSON Schema 검증 및 Swagger 문서화 적용 - 트랜잭션 패턴을 withTransaction 헬퍼로 추상화 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
542 B
JavaScript
20 lines
542 B
JavaScript
/**
|
|
* 인증 스키마
|
|
*/
|
|
|
|
export const loginRequest = {
|
|
type: 'object',
|
|
properties: {
|
|
username: { type: 'string', minLength: 1, maxLength: 50, description: '사용자명' },
|
|
password: { type: 'string', minLength: 1, maxLength: 100, description: '비밀번호' },
|
|
},
|
|
required: ['username', 'password'],
|
|
};
|
|
|
|
export const loginResponse = {
|
|
type: 'object',
|
|
properties: {
|
|
token: { type: 'string', description: 'JWT 토큰' },
|
|
expiresAt: { type: 'string', format: 'date-time', description: '만료 시간' },
|
|
},
|
|
};
|