feat(fullstack): Read user out of JWT and persist with created and last modified
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.betriebsratkanzlei.legalconsenthub.user
|
||||
|
||||
import com.betriebsratkanzlei.legalconsenthub_api.model.UserDto
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Component
|
||||
class UserMapper() {
|
||||
fun toUserDto(user: User): UserDto {
|
||||
return UserDto(
|
||||
id = user.id,
|
||||
name = user.name,
|
||||
)
|
||||
}
|
||||
|
||||
fun toUser(userDto: UserDto): User {
|
||||
return User(
|
||||
id = userDto.id,
|
||||
name = userDto.name,
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user