Skip to content

Commit

Permalink
refactor : requestBody -> modelAttribute
Browse files Browse the repository at this point in the history
- Get request
  • Loading branch information
kochungcheon committed May 18, 2024
1 parent 4d1e597 commit b53fe7c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
Expand All @@ -28,7 +30,7 @@ public ResponseEntity<CreateShareFileRes> createShareFile(@Valid @RequestBody Cr
}

@GetMapping("/download")
public ResponseEntity<DownloadShareFileRes> downloadShareFile(@Valid @RequestBody DownloadShareFileReq req) {
public ResponseEntity<DownloadShareFileRes> downloadShareFile(@Valid @ModelAttribute DownloadShareFileReq req) {
DownloadShareFileRes res = fileShareService.downloadShareFile(req.shareLink(), req.userPath());
return ResponseEntity.ok(res);
}
Expand Down

0 comments on commit b53fe7c

Please sign in to comment.