diff --git a/api/legalconsenthub.yml b/api/legalconsenthub.yml index 4af2eb3..abf0646 100644 --- a/api/legalconsenthub.yml +++ b/api/legalconsenthub.yml @@ -524,22 +524,6 @@ paths: $ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError" "503": $ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable" - delete: - summary: Delete a user - operationId: deleteUser - tags: - - user - responses: - "204": - description: User successfully deleted - "400": - $ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest" - "401": - $ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized" - "500": - $ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError" - "503": - $ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable" /users/{id}/email-preferences: parameters: diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserController.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserController.kt index 0fa1e43..5056b97 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserController.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserController.kt @@ -16,11 +16,6 @@ class UserController( return ResponseEntity.ok(userMapper.toUserDto(user)) } - override fun deleteUser(id: String): ResponseEntity { - userService.deleteUser(id) - return ResponseEntity.noContent().build() - } - override fun updateUserEmailPreferences( id: String, updateEmailPreferencesDto: UpdateEmailPreferencesDto, diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserService.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserService.kt index e762626..c118586 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserService.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/user/UserService.kt @@ -11,7 +11,6 @@ import org.springframework.stereotype.Service @Service class UserService( private val userRepository: UserRepository, - private val userMapper: UserMapper, ) { fun getCurrentUser(): User { val principal = SecurityContextHolder.getContext().authentication.principal as CustomJwtTokenPrincipal @@ -67,10 +66,6 @@ class UserService( return userRepository.save(user) } - fun deleteUser(userId: String) { - userRepository.deleteById(userId) - } - @Transactional fun updateEmailPreferences( userId: String, diff --git a/legalconsenthub/app/composables/user/useUserApi.ts b/legalconsenthub/app/composables/user/useUserApi.ts index 18b91eb..e5c89ba 100644 --- a/legalconsenthub/app/composables/user/useUserApi.ts +++ b/legalconsenthub/app/composables/user/useUserApi.ts @@ -23,13 +23,8 @@ export function useUserApi() { return userApiClient.updateUserEmailPreferences({ id, updateEmailPreferencesDto }) } - async function deleteUser(id: string): Promise { - return userApiClient.deleteUser({ id }) - } - return { getUserById, - updateEmailPreferences, - deleteUser + updateEmailPreferences } }