Skip to content

Commit

Permalink
Merge pull request #70 from mju-likelion/feature/apply-exist-studentI…
Browse files Browse the repository at this point in the history
…d-validation-#69

Feature/#69 지원 확인 시 학번 형식 검사
  • Loading branch information
Dh3356 authored Feb 22, 2024
2 parents ff19281 + 09d4483 commit f601163
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.mjulikelion.bagel.controller;

import static org.mjulikelion.bagel.constant.RegexPatterns.APPLICATION_STUDENT_ID_PATTERN;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import org.mjulikelion.bagel.dto.request.ApplySaveDto;
import org.mjulikelion.bagel.dto.response.ResponseDto;
Expand All @@ -24,7 +27,7 @@ public class ApplyController {

@GetMapping("/exist/{studentId}")
public ResponseEntity<ResponseDto<ApplyExistResponseData>> getApplicationExist(
@PathVariable("studentId") String studentId) {
@PathVariable("studentId") @Pattern(regexp = APPLICATION_STUDENT_ID_PATTERN) @Valid String studentId) {
return this.applyQueryService.getApplyExist(studentId);
}

Expand Down

0 comments on commit f601163

Please sign in to comment.