This commit is contained in:
parent
e06b4c3179
commit
48706f0bd5
|
@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.RequestMapping
|
|||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
@PreAuthorize("hasRole('CREATOR')")
|
||||
@RequestMapping("/creator-admin/member")
|
||||
class CreatorAdminMemberController(private val service: CreatorAdminMemberService) {
|
||||
@PostMapping("/login")
|
||||
fun login(@RequestBody loginRequest: LoginRequest) = service.login(loginRequest)
|
||||
|
||||
@PostMapping("/logout")
|
||||
@PreAuthorize("hasRole('CREATOR')")
|
||||
fun logout(
|
||||
@RequestHeader("Authorization") token: String,
|
||||
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
|
||||
|
|
Loading…
Reference in New Issue