Skip to content

Commit

Permalink
edit : 탈퇴 로직 수정 (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlswns2480 authored Aug 28, 2024
1 parent 21fe0c1 commit 1211896
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ package com.pokit.auth.dto.request

import com.pokit.token.dto.request.RevokeRequest
import com.pokit.token.model.AuthPlatform
import io.swagger.v3.oas.annotations.media.Schema

data class ApiRevokeRequest(
@Schema(description = "플랫폼에서 받은 Refresh Token")
val refreshToken: String,
val authPlatform: String
)

internal fun ApiRevokeRequest.toDto() = RevokeRequest(
refreshToken = this.refreshToken,
authPlatform = AuthPlatform.of(this.authPlatform)
)
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ class AuthService(
throw ClientValidationException(AuthErrorCode.INCORRECT_PLATFORM)
}

when (request.authPlatform) {
AuthPlatform.GOOGLE -> googleApiClient.revoke(request.refreshToken)
AuthPlatform.APPLE -> appleApiClient.revoke(request.refreshToken)
}
contentPort.deleteByUserId(user.id)
userPort.delete(user)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ package com.pokit.token.dto.request
import com.pokit.token.model.AuthPlatform

data class RevokeRequest(
val refreshToken: String,
val authPlatform: AuthPlatform
)

0 comments on commit 1211896

Please sign in to comment.