-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: create schedule middleware #35
Conversation
@@ -5,8 +5,7 @@ import middlewares from '@/middlewares' | |||
|
|||
const router: Router = asyncify(express.Router()) | |||
|
|||
// TODO: add validator(eventId, authorId) | |||
router.post('/', async (req: Request, res: Response) => { | |||
router.post('/', middlewares.schedules.addScheduleMiddleware, async (req: Request, res: Response) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 미들웨어를 통해 등록된 행사와 관련된 일정만 생성할 수 있게 되는 것으로 확인했습니다.
제가 해당 토의가 정확하게 인지가 안되어서 그런데 해당 방향으로 결정된 것일까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확실하게 결정되지 않은 상황이여서 일단 기본적인 외래키 제약조건만 검사할 수 있도록 설정해두었습니다 :)
추후에 해당 안건이 결정된다면 @/middlewares/schedules.ts/#addScheduleMiddleware
에 체이닝하여 설정할 예정이에요!
#34 PR이 머지된 후에 리뷰 요청 드릴게요