Skip to content

Commit

Permalink
Merge pull request #188 from SPACE-FOR-SPACE/feat/#187
Browse files Browse the repository at this point in the history
유저 조회 기능 구현
  • Loading branch information
GSB0203 authored Nov 27, 2024
2 parents 0642469 + 5dab9c7 commit 5aa57a4
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.space.server.domain.user.presentation;


import com.space.server.domain.user.presentation.dto.request.UserRequest;
import com.space.server.domain.user.presentation.dto.response.UserResponse;
import com.space.server.domain.user.service.CommandUserService;
Expand All @@ -23,9 +22,15 @@ public class UserController {
private final CommandUserService commandUserService;
private final QueryUserService queryUserService;

@GetMapping("{user-id}")
@Operation(summary = "유저Id로 조회", description = "유저의 정보를 조회합니다.")
public UserResponse readOne(@PathVariable("user-id") Long userId) {
return UserResponse.from(queryUserService.readOne(userId));
}

@GetMapping
@Operation(summary = "유저 조회", description = "유저의 정보를 조회합니다.")
public UserResponse readOne() {
@Operation(summary = "유저(자신) 조회", description = "유저의 정보를 조회합니다.")
public UserResponse readMine() {
return UserResponse.from(queryUserService.readOne(getMemberId()));
}

Expand Down

0 comments on commit 5aa57a4

Please sign in to comment.