feat(events,cameras): camera 검증 + station 필터 + cameras 정렬 - #30
Merged
Hidden character warning
The head ref may contain hidden characters: "feature/\uc870\uc218\uadfc-camera-validation"
Conversation
팀원 피드백 3종 일괄 반영. - (#5) POST /api/events/ 가 camera_id 검증 없이 행을 만들었음 → camera 미존재 404, 비활성(is_active=false) 400 으로 거부 - (#6) GET /api/cameras/ 가 정렬 없어 토글/새로고침마다 순서가 흔들림 → order_by(Camera.id) 추가 - (#3) GET /api/events/ 에 station 명시 파라미터 추가. 통합 search 로 station_name 부분일치 가능했지만 명시 필터가 더 깔끔. station 단독으로 들어오면 Camera 조인 후 station_name ILIKE 매칭. search 와는 AND. 같은 Camera 조인이 search 와 station 양쪽에서 발생하지 않게 한 번만 적용하도록 정리. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
팀원 피드백 3종 일괄 반영.
#5 — 비활성 카메라 이벤트 거부 (보안/검증)
POST /api/events/가camera_id검증 없이 행을 만들고 있었음. 추가:is_active=false→ 400 Bad Request#6 — 카메라 정렬 (UX 버그)
GET /api/cameras/에 정렬이 없어 토글/새로고침마다 순서가 흔들림.order_by(Camera.id)추가.#3 — events
station명시 파라미터어제 추가한 통합
search가Camera.station_name부분일치를 잡긴 하지만 명시 필터가 더 깔끔.GET /api/events/?station=<역이름>추가.search와는 AND. 같은 Camera 조인이 양쪽에서 중복되지 않게 한 번만 적용하도록 정리.변경 파일
변경사항