mirror of https://github.com/usbharu/Hideout.git
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
14149001c9
commit
a0b434b023
|
@ -65,20 +65,20 @@ constructor(
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "Person(" +
|
return "Person(" +
|
||||||
"name='$name', " +
|
"name='$name', " +
|
||||||
"id='$id', " +
|
"id='$id', " +
|
||||||
"preferredUsername=$preferredUsername, " +
|
"preferredUsername=$preferredUsername, " +
|
||||||
"summary=$summary, " +
|
"summary=$summary, " +
|
||||||
"inbox='$inbox', " +
|
"inbox='$inbox', " +
|
||||||
"outbox='$outbox', " +
|
"outbox='$outbox', " +
|
||||||
"url='$url', " +
|
"url='$url', " +
|
||||||
"icon=$icon, " +
|
"icon=$icon, " +
|
||||||
"publicKey=$publicKey, " +
|
"publicKey=$publicKey, " +
|
||||||
"endpoints=$endpoints, " +
|
"endpoints=$endpoints, " +
|
||||||
"followers=$followers, " +
|
"followers=$followers, " +
|
||||||
"following=$following, " +
|
"following=$following, " +
|
||||||
"manuallyApprovesFollowers=$manuallyApprovesFollowers" +
|
"manuallyApprovesFollowers=$manuallyApprovesFollowers" +
|
||||||
")" +
|
")" +
|
||||||
" ${super.toString()}"
|
" ${super.toString()}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ data class Actor private constructor(
|
||||||
val locked: Boolean
|
val locked: Boolean
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
class UserBuilder(private val characterLimit: CharacterLimit, private val applicationConfig: ApplicationConfig) {
|
class UserBuilder(private val characterLimit: CharacterLimit, private val applicationConfig: ApplicationConfig) {
|
||||||
|
|
||||||
|
@ -147,24 +146,22 @@ data class Actor private constructor(
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "Actor(" +
|
return "Actor(" +
|
||||||
"id=$id, " +
|
"id=$id, " +
|
||||||
"name='$name', " +
|
"name='$name', " +
|
||||||
"domain='$domain', " +
|
"domain='$domain', " +
|
||||||
"screenName='$screenName', " +
|
"screenName='$screenName', " +
|
||||||
"description='$description', " +
|
"description='$description', " +
|
||||||
"inbox='$inbox', " +
|
"inbox='$inbox', " +
|
||||||
"outbox='$outbox', " +
|
"outbox='$outbox', " +
|
||||||
"url='$url', " +
|
"url='$url', " +
|
||||||
"publicKey='$publicKey', " +
|
"publicKey='$publicKey', " +
|
||||||
"privateKey=$privateKey, " +
|
"privateKey=$privateKey, " +
|
||||||
"createdAt=$createdAt, " +
|
"createdAt=$createdAt, " +
|
||||||
"keyId='$keyId', " +
|
"keyId='$keyId', " +
|
||||||
"followers=$followers, " +
|
"followers=$followers, " +
|
||||||
"following=$following, " +
|
"following=$following, " +
|
||||||
"instance=$instance, " +
|
"instance=$instance, " +
|
||||||
"locked=$locked" +
|
"locked=$locked" +
|
||||||
")"
|
")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,10 +45,8 @@ class UserDetailRepositoryImpl : UserDetailRepository {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
object UserDetails : LongIdTable("user_details") {
|
object UserDetails : LongIdTable("user_details") {
|
||||||
val actorId = long("actor_id").references(Actors.id)
|
val actorId = long("actor_id").references(Actors.id)
|
||||||
val password = varchar("password", 255)
|
val password = varchar("password", 255)
|
||||||
|
|
|
@ -172,7 +172,6 @@ class AccountApiServiceImpl(
|
||||||
|
|
||||||
override suspend fun updateProfile(userid: Long, updateCredentials: UpdateCredentials?): Account =
|
override suspend fun updateProfile(userid: Long, updateCredentials: UpdateCredentials?): Account =
|
||||||
transaction.transaction {
|
transaction.transaction {
|
||||||
|
|
||||||
val avatarMedia = if (updateCredentials?.avatar != null) {
|
val avatarMedia = if (updateCredentials?.avatar != null) {
|
||||||
mediaService.uploadLocalMedia(
|
mediaService.uploadLocalMedia(
|
||||||
MediaRequest(
|
MediaRequest(
|
||||||
|
@ -199,7 +198,6 @@ class AccountApiServiceImpl(
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val account = accountService.findById(userid)
|
val account = accountService.findById(userid)
|
||||||
|
|
||||||
val updateUserDto = UpdateUserDto(
|
val updateUserDto = UpdateUserDto(
|
||||||
|
|
Loading…
Reference in New Issue