Finish authentication
This commit is contained in:
14
src/main/kotlin/top/fatweb/api/converter/UserConverter.kt
Normal file
14
src/main/kotlin/top/fatweb/api/converter/UserConverter.kt
Normal file
@@ -0,0 +1,14 @@
|
||||
package top.fatweb.api.converter
|
||||
|
||||
import org.mapstruct.Mapper
|
||||
import org.mapstruct.Mapping
|
||||
import org.mapstruct.Mappings
|
||||
import top.fatweb.api.entity.permission.User
|
||||
import top.fatweb.api.param.LoginParam
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
interface UserConverter {
|
||||
@Mappings(Mapping(source = "username", target = "username"), Mapping(source = "password", target = "password"))
|
||||
fun loginParamToUser(loginParam: LoginParam): User
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user