Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/najasin/na-jasin-be into…
Browse files Browse the repository at this point in the history
… feature/#21
  • Loading branch information
adoo24 committed Aug 22, 2023
2 parents a4087cc + c572c61 commit ad20cac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

Expand All @@ -17,7 +18,7 @@
import lombok.RequiredArgsConstructor;

@RestController
@RequestMapping("/api/characterItems")
@RequestMapping("/api/{userType}/characterItems")
@RequiredArgsConstructor
public class CharacterController {

Expand All @@ -26,7 +27,7 @@ public class CharacterController {
private String baseImage;

@GetMapping
public ResponseEntity<ApiResponse<CharacterItemsResponse>> getCharacterItems() {
public ResponseEntity<ApiResponse<CharacterItemsResponse>> getCharacterItems(@PathVariable String userType) {
CharacterItemsParam characterItems = characterService.findAllItems();
return ResponseEntity.ok(createSuccessWithData(
CharacterItemResponse.FIND_ALL_ITEMS_SUCCESS.getMsg(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public void updateCharacter(UserUserType userUserType, ManualCharacterItems item
userUserType.updateCharacter(characterService.findCharacterSetById(items.set()));
} else {
userUserType.updateCharacter(
characterService.findFaceById(items.face()),
characterService.findBodyById(items.body()),
characterService.findExpressionById(items.expression()));
isNull(items.face()) ? null : characterService.findFaceById(items.face()),
isNull(items.body()) ? null : characterService.findBodyById(items.body()),
isNull(items.expression()) ? null : characterService.findExpressionById(items.expression()));
}
}

Expand Down

0 comments on commit ad20cac

Please sign in to comment.