Skip to content

Commit

Permalink
Merge pull request #323 from GSM-MSG/322-not-use-api-delete
Browse files Browse the repository at this point in the history
🔀 :: 쓰이지 않는 api 삭제
  • Loading branch information
Umjiseung authored May 9, 2024
2 parents c4cbeb8 + 17b386f commit 2c28d1e
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ import com.msg.gauth.global.util.count.auth.RefreshToken
import org.springframework.data.repository.CrudRepository

interface RefreshTokenRepository: CrudRepository<RefreshToken, Long>{
fun findByUserId(userId: Long): RefreshToken?
fun findByToken(token: String): RefreshToken?
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class UserController(
private val changePasswordService: ChangePasswordService,
private val getMyProfileService: GetMyProfileService,
private val getAcceptedUsersService: GetAcceptedUsersService,
private val acceptTeacherSignUpService: AcceptTeacherSignUpService,
private val getPendingUsersService: GetPendingUsersService,
private val acceptStudentSignUpService: AcceptStudentSignUpService,
private val getMyRolesService: GetMyRolesService,
private val acceptUserSignUpService: AcceptUserSignUpService,
private val rejectUserSignUpService: RejectUserSignUpService,
Expand Down Expand Up @@ -72,18 +70,4 @@ class UserController(
rejectUserSignUpService.execute(id)
return ResponseEntity.noContent().build()
}

@Deprecated("This api is deprecated. Use acceptUser instead")
@PatchMapping("/accept-teacher")
fun acceptTeacher(@RequestBody @Valid acceptTeacherReqDto: AcceptTeacherReqDto): ResponseEntity<Void>{
acceptTeacherSignUpService.execute(acceptTeacherReqDto)
return ResponseEntity.noContent().build()
}

@Deprecated("This api is deprecated. Use acceptUser instead")
@PatchMapping("/accept-student")
fun acceptStudent(@RequestBody @Valid acceptedStudentReqDto: AcceptStudentReqDto): ResponseEntity<Void> {
acceptStudentSignUpService.execute(acceptedStudentReqDto)
return ResponseEntity.noContent().build()
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
package com.msg.gauth.domain.user.repository

import com.msg.gauth.domain.user.User
import com.msg.gauth.domain.user.enums.UserRoleType
import com.msg.gauth.domain.user.enums.UserState
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.EntityGraph
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Query

interface UserRepository: JpaRepository<User, Long>, CustomUserRepository {
@EntityGraph(attributePaths = ["userRole"])
fun findByEmail(email: String): User?
fun findByEmailIn(emailList: List<String>): List<User>
fun existsByEmail(email: String): Boolean
@Query("select user.email from User user")
fun findAllEmail(): List<String>
fun findAllByState(state: UserState): List<User>
fun findAllByState(state: UserState, pageable: Pageable): Page<User>
fun findByIdAndState(id: Long, roles: UserState): User?
@Query("select user from User user where user.id = :id and user.state = :state and user.userRole = :userRole")
fun findByIdAndStateAndUserRole(id: Long, state: UserState, userRole: UserRoleType): User?
}

This file was deleted.

This file was deleted.

0 comments on commit 2c28d1e

Please sign in to comment.