style: スタイルを調整

This commit is contained in:
usbharu 2023-09-30 11:25:31 +09:00
parent a21a4d7d96
commit 21fdded27d
4 changed files with 8 additions and 11 deletions

View File

@ -4,7 +4,7 @@ import dev.usbharu.hideout.domain.model.hideout.entity.Timeline
import org.springframework.data.domain.Pageable
import org.springframework.data.mongodb.repository.MongoRepository
@Suppress("LongParameterList")
@Suppress("LongParameterList", "FunctionMaxLength")
interface MongoTimelineRepository : MongoRepository<Timeline, Long> {
fun findByUserId(id: Long): List<Timeline>
fun findByUserIdAndTimelineId(userId: Long, timelineId: Long): List<Timeline>

View File

@ -21,9 +21,8 @@ class MongoTimelineRepositoryWrapper(
}
}
override suspend fun saveAll(timelines: List<Timeline>): List<Timeline> {
return mongoTimelineRepository.saveAll(timelines)
}
override suspend fun saveAll(timelines: List<Timeline>): List<Timeline> =
mongoTimelineRepository.saveAll(timelines)
override suspend fun findByUserId(id: Long): List<Timeline> {
return withContext(Dispatchers.IO) {

View File

@ -190,11 +190,11 @@ class APNoteServiceImpl(
override suspend fun fetchNote(note: Note, targetActor: String?): Note =
note(note, targetActor, note.id ?: throw IllegalArgumentException("note.id is null"))
companion object {
const val public: String = "https://www.w3.org/ns/activitystreams#Public"
}
override suspend fun run(post: Post) {
createNote(post)
}
companion object {
const val public: String = "https://www.w3.org/ns/activitystreams#Public"
}
}

View File

@ -23,9 +23,7 @@ class PostServiceImpl(
return create
}
override suspend fun createRemote(post: Post): Post {
return internalCreate(post, false)
}
override suspend fun createRemote(post: Post): Post = internalCreate(post, false)
override fun addInterceptor(postCreateInterceptor: PostCreateInterceptor) {
interceptors.add(postCreateInterceptor)