Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
location list #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingadinga committed Aug 28, 2022
1 parent 5467118 commit 0fa4341
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/team20/t4/post/PostController.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ public ListAppointmentSimpleResponseDto getMyPostList(){
return postService.getPostListWrittenByMe();
}

@GetMapping("/locations")
public List<String> getGus(){
return postService.getGuList();
}
}
10 changes: 10 additions & 0 deletions src/main/java/com/team20/t4/post/PostService.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,14 @@ public ListAppointmentSimpleResponseDto getPostListByLocation(Location location)
return new ListAppointmentSimpleResponseDto(responseDtoList);
}

@Transactional
public List<String> getGuList(){
List<String> guList = new ArrayList<>();
Gu[] values = Gu.values();
for(Gu gu:values){
guList.add(gu.getValue());
}
return guList;
}

}

0 comments on commit 0fa4341

Please sign in to comment.