mirror of https://github.com/usbharu/Hideout.git
style: スタイルを修正
This commit is contained in:
parent
7b65458b2f
commit
f3dd22caa9
|
@ -56,16 +56,15 @@ import java.util.*
|
|||
|
||||
@EnableWebSecurity(debug = false)
|
||||
@Configuration
|
||||
@Suppress("FunctionMaxLength")
|
||||
@Suppress("FunctionMaxLength", "TooManyFunctions")
|
||||
class SecurityConfig {
|
||||
|
||||
@Autowired
|
||||
private lateinit var userQueryService: UserQueryService
|
||||
|
||||
@Bean
|
||||
fun authenticationManager(authenticationConfiguration: AuthenticationConfiguration): AuthenticationManager? {
|
||||
return authenticationConfiguration.authenticationManager
|
||||
}
|
||||
fun authenticationManager(authenticationConfiguration: AuthenticationConfiguration): AuthenticationManager? =
|
||||
authenticationConfiguration.authenticationManager
|
||||
|
||||
@Bean
|
||||
@Order(1)
|
||||
|
|
|
@ -15,7 +15,6 @@ class MastodonStatusesApiContoller(private val statusesApiService: StatusesApiSe
|
|||
override suspend fun apiV1StatusesPost(
|
||||
devUsbharuHideoutDomainModelMastodonStatusesRequest: StatusesRequest
|
||||
): ResponseEntity<Status> {
|
||||
|
||||
val jwt = SecurityContextHolder.getContext().authentication.principal as Jwt
|
||||
|
||||
return ResponseEntity(
|
||||
|
@ -25,6 +24,5 @@ class MastodonStatusesApiContoller(private val statusesApiService: StatusesApiSe
|
|||
),
|
||||
HttpStatus.OK
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,15 +21,17 @@ data class User private constructor(
|
|||
val followers: String? = null,
|
||||
val following: String? = null
|
||||
) {
|
||||
override fun toString(): String {
|
||||
return "User(id=$id, name='$name', domain='$domain', screenName='$screenName', description='$description', password=$password, inbox='$inbox', outbox='$outbox', url='$url', publicKey='$publicKey', privateKey=$privateKey, createdAt=$createdAt, keyId='$keyId', followers=$followers, following=$following)"
|
||||
}
|
||||
override fun toString(): String =
|
||||
"User(id=$id, name='$name', domain='$domain', screenName='$screenName', description='$description'," +
|
||||
" password=$password, inbox='$inbox', outbox='$outbox', url='$url', publicKey='$publicKey'," +
|
||||
" privateKey=$privateKey, createdAt=$createdAt, keyId='$keyId', followers=$followers," +
|
||||
" following=$following)"
|
||||
|
||||
companion object {
|
||||
|
||||
private val logger = LoggerFactory.getLogger(User::class.java)
|
||||
|
||||
@Suppress("LongParameterList", "FunctionMinLength")
|
||||
@Suppress("LongParameterList", "FunctionMinLength", "LongMethod")
|
||||
fun of(
|
||||
id: Long,
|
||||
name: String,
|
||||
|
|
|
@ -23,7 +23,6 @@ import dev.usbharu.hideout.service.core.Transaction
|
|||
import dev.usbharu.hideout.service.job.JobQueueParentService
|
||||
import dev.usbharu.hideout.service.post.PostCreateInterceptor
|
||||
import dev.usbharu.hideout.service.post.PostService
|
||||
import io.ktor.client.*
|
||||
import io.ktor.client.plugins.*
|
||||
import kjob.core.job.JobProps
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
@ -58,7 +57,6 @@ interface APNoteService {
|
|||
@Service
|
||||
@Suppress("LongParameterList")
|
||||
class APNoteServiceImpl(
|
||||
private val httpClient: HttpClient,
|
||||
private val jobQueueParentService: JobQueueParentService,
|
||||
private val postRepository: PostRepository,
|
||||
private val apUserService: APUserService,
|
||||
|
|
|
@ -89,17 +89,16 @@ class APNoteServiceImplTest {
|
|||
val jobQueueParentService = mock<JobQueueParentService>()
|
||||
val activityPubNoteService =
|
||||
APNoteServiceImpl(
|
||||
httpClient = mock(),
|
||||
jobQueueParentService = jobQueueParentService,
|
||||
postRepository = mock(),
|
||||
apUserService = mock(),
|
||||
userQueryService = userQueryService,
|
||||
followerQueryService = followerQueryService,
|
||||
postQueryService = mock(),
|
||||
mediaQueryService = mediaQueryService,
|
||||
objectMapper = objectMapper,
|
||||
applicationConfig = testApplicationConfig,
|
||||
postService = mock(),
|
||||
mediaQueryService = mediaQueryService,
|
||||
apResourceResolveService = mock(),
|
||||
apRequestService = mock(),
|
||||
transaction = mock()
|
||||
|
@ -132,20 +131,19 @@ class APNoteServiceImplTest {
|
|||
}
|
||||
)
|
||||
val activityPubNoteService = APNoteServiceImpl(
|
||||
httpClient = httpClient,
|
||||
jobQueueParentService = mock(),
|
||||
postRepository = mock(),
|
||||
apUserService = mock(),
|
||||
userQueryService = mock(),
|
||||
followerQueryService = mock(),
|
||||
postQueryService = mock(),
|
||||
mediaQueryService = mediaQueryService,
|
||||
objectMapper = objectMapper,
|
||||
applicationConfig = testApplicationConfig,
|
||||
postService = mock(),
|
||||
mediaQueryService = mediaQueryService,
|
||||
apResourceResolveService = mock(),
|
||||
transaction = mock(),
|
||||
apRequestService = mock()
|
||||
apRequestService = mock(),
|
||||
transaction = mock()
|
||||
)
|
||||
activityPubNoteService.createNoteJob(
|
||||
JobProps(
|
||||
|
|
Loading…
Reference in New Issue