File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/src/main/java/com/growit/app/goal/controller Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ public class GoalController {
3838
3939 @ GetMapping
4040 public ResponseEntity <ApiResponse <List <Goal >>> getMyGoal (
41- @ AuthenticationPrincipal User user , @ RequestParam (required = false ) GoalStatus status ) {
42- status = status == null ? GoalStatus .NONE : status ;
43- List <Goal > goals = getUserGoalsUseCase .getMyGoals (user , status );
41+ @ AuthenticationPrincipal User user , @ RequestParam (required = false ) String status ) {
42+ GoalStatus goalStatus ;
43+ goalStatus = status == null ? GoalStatus .NONE : GoalStatus .valueOf (status );
44+ List <Goal > goals = getUserGoalsUseCase .getMyGoals (user , goalStatus );
4445 return ResponseEntity .ok (ApiResponse .success (goals ));
4546 }
4647
You can’t perform that action at this time.
0 commit comments