mirror of https://github.com/usbharu/Hideout.git
style: スタイルを調整
This commit is contained in:
parent
0d7e4aaedc
commit
4ca9fe6cfb
|
@ -4,7 +4,7 @@ import dev.usbharu.hideout.domain.model.hideout.entity.Timeline
|
||||||
import org.springframework.data.domain.Pageable
|
import org.springframework.data.domain.Pageable
|
||||||
import org.springframework.data.mongodb.repository.MongoRepository
|
import org.springframework.data.mongodb.repository.MongoRepository
|
||||||
|
|
||||||
@Suppress("LongParameterList")
|
@Suppress("LongParameterList", "FunctionMaxLength")
|
||||||
interface MongoTimelineRepository : MongoRepository<Timeline, Long> {
|
interface MongoTimelineRepository : MongoRepository<Timeline, Long> {
|
||||||
fun findByUserId(id: Long): List<Timeline>
|
fun findByUserId(id: Long): List<Timeline>
|
||||||
fun findByUserIdAndTimelineId(userId: Long, timelineId: Long): List<Timeline>
|
fun findByUserIdAndTimelineId(userId: Long, timelineId: Long): List<Timeline>
|
||||||
|
|
|
@ -21,9 +21,8 @@ class MongoTimelineRepositoryWrapper(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun saveAll(timelines: List<Timeline>): List<Timeline> {
|
override suspend fun saveAll(timelines: List<Timeline>): List<Timeline> =
|
||||||
return mongoTimelineRepository.saveAll(timelines)
|
mongoTimelineRepository.saveAll(timelines)
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun findByUserId(id: Long): List<Timeline> {
|
override suspend fun findByUserId(id: Long): List<Timeline> {
|
||||||
return withContext(Dispatchers.IO) {
|
return withContext(Dispatchers.IO) {
|
||||||
|
|
|
@ -190,11 +190,11 @@ class APNoteServiceImpl(
|
||||||
override suspend fun fetchNote(note: Note, targetActor: String?): Note =
|
override suspend fun fetchNote(note: Note, targetActor: String?): Note =
|
||||||
note(note, targetActor, note.id ?: throw IllegalArgumentException("note.id is null"))
|
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) {
|
override suspend fun run(post: Post) {
|
||||||
createNote(post)
|
createNote(post)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val public: String = "https://www.w3.org/ns/activitystreams#Public"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,7 @@ class PostServiceImpl(
|
||||||
return create
|
return create
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun createRemote(post: Post): Post {
|
override suspend fun createRemote(post: Post): Post = internalCreate(post, false)
|
||||||
return internalCreate(post, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun addInterceptor(postCreateInterceptor: PostCreateInterceptor) {
|
override fun addInterceptor(postCreateInterceptor: PostCreateInterceptor) {
|
||||||
interceptors.add(postCreateInterceptor)
|
interceptors.add(postCreateInterceptor)
|
||||||
|
|
Loading…
Reference in New Issue