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
bdd69d258c
commit
53d195bd8d
|
@ -72,7 +72,7 @@ class PostServiceImpl(
|
|||
postQueryService.findByActorId(actorId).filterNot { it.delted }.forEach { postRepository.save(it.delete()) }
|
||||
|
||||
val actor = actorRepository.findById(actorId)
|
||||
?: throw IllegalStateException("actor: ${actorId} was not found.")
|
||||
?: throw IllegalStateException("actor: $actorId was not found.")
|
||||
|
||||
actorRepository.save(actor.copy(postsCount = 0, lastPostDate = null))
|
||||
}
|
||||
|
|
|
@ -113,8 +113,6 @@ class RelationshipServiceImpl(
|
|||
|
||||
val inverseRelationship = relationshipRepository.findByUserIdAndTargetUserId(targetId, actorId)
|
||||
|
||||
|
||||
|
||||
if (inverseRelationship?.following == true) {
|
||||
actorRepository.save(targetActor.decrementFollowing())
|
||||
actorRepository.save(user.decrementFollowers())
|
||||
|
@ -131,7 +129,6 @@ class RelationshipServiceImpl(
|
|||
val remoteUser = isRemoteUser(targetId)
|
||||
|
||||
if (remoteUser != null) {
|
||||
|
||||
apSendBlockService.sendBlock(user, remoteUser)
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +258,6 @@ class RelationshipServiceImpl(
|
|||
val remoteUser = isRemoteUser(targetId)
|
||||
|
||||
if (remoteUser != null) {
|
||||
|
||||
apSendUndoService.sendUndoFollow(user, remoteUser)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.time.Instant
|
|||
@Repository
|
||||
class AccountQueryServiceImpl(private val applicationConfig: ApplicationConfig) : AccountQueryService {
|
||||
override suspend fun findById(accountId: Long): Account {
|
||||
|
||||
val query = Actors.select { Actors.id eq accountId }
|
||||
|
||||
return query
|
||||
|
|
Loading…
Reference in New Issue