From 7392875c86853148df4a875cd92219601400db4a Mon Sep 17 00:00:00 2001 From: jarno Date: Mon, 7 Oct 2024 21:26:34 +0200 Subject: [PATCH] DEBUG: cookie value --- pom.xml | 2 +- .../wiemanapi/presentation/ProfileController.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 1558485..efdb075 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.wiemanboy WiemanApi - 0.0.1 + 0.0.1-DEBUG WiemanApi WiemanApi diff --git a/src/main/java/com/wiemanboy/wiemanapi/presentation/ProfileController.java b/src/main/java/com/wiemanboy/wiemanapi/presentation/ProfileController.java index b120fdb..bc11de8 100644 --- a/src/main/java/com/wiemanboy/wiemanapi/presentation/ProfileController.java +++ b/src/main/java/com/wiemanboy/wiemanapi/presentation/ProfileController.java @@ -3,10 +3,7 @@ import com.wiemanboy.wiemanapi.application.ProfileService; import com.wiemanboy.wiemanapi.presentation.dto.response.ProfileDto; import com.wiemanboy.wiemanapi.presentation.dto.response.ProfileLocaleDto; -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; +import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api/profiles") @@ -18,6 +15,11 @@ public ProfileController(ProfileService profileService) { this.profileService = profileService; } + @GetMapping("/test") + public String getTest(@CookieValue(value = "token") String testCookie) { + return "Cookie value: " + testCookie; + } + @GetMapping("/{id}") public ProfileDto getProfile(@PathVariable String id) { return ProfileDto.from(profileService.getProfile(id));