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
cac777a8c0
commit
9c6c0a450b
|
@ -22,10 +22,8 @@ class HttpClientConfig {
|
|||
install(Logging) {
|
||||
logger = Logger.DEFAULT
|
||||
level = LogLevel.INFO
|
||||
|
||||
}
|
||||
install(HttpCache) {
|
||||
|
||||
}
|
||||
expectSuccess = true
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ import java.security.interfaces.RSAPrivateKey
|
|||
import java.security.interfaces.RSAPublicKey
|
||||
import java.util.*
|
||||
|
||||
|
||||
@EnableWebSecurity(debug = false)
|
||||
@Configuration
|
||||
class SecurityConfig {
|
||||
|
|
|
@ -55,7 +55,6 @@ class PostRepositoryImpl(private val idGenerateService: IdGenerateService) : Pos
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
assert(Posts.select { Posts.id eq post.id }.singleOrNull() != null) {
|
||||
"Faild to insert"
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ class APLikeServiceImpl(
|
|||
val content = like.content ?: throw IllegalActivityPubObjectException("content is null")
|
||||
like.`object` ?: throw IllegalActivityPubObjectException("object is null")
|
||||
transaction.transaction {
|
||||
|
||||
LOGGER.trace("FETCH Liked Person $actor")
|
||||
val person = apUserService.fetchPersonWithEntity(actor)
|
||||
LOGGER.trace("{}", person.second)
|
||||
|
|
|
@ -206,7 +206,8 @@ class APServiceImpl(
|
|||
logger.debug("process activity: {}", type)
|
||||
return when (type) {
|
||||
ActivityType.Accept -> apAcceptService.receiveAccept(objectMapper.readValue(json))
|
||||
ActivityType.Follow -> apReceiveFollowService
|
||||
ActivityType.Follow ->
|
||||
apReceiveFollowService
|
||||
.receiveFollow(objectMapper.readValue(json, Follow::class.java))
|
||||
ActivityType.Create -> apCreateService.receiveCreate(objectMapper.readValue(json))
|
||||
ActivityType.Like -> apLikeService.receiveLike(objectMapper.readValue(json))
|
||||
|
|
|
@ -18,7 +18,6 @@ class MdcXrequestIdFilter : Filter {
|
|||
} finally {
|
||||
MDC.remove(KEY)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -16,7 +16,6 @@ class ReactionServiceImpl(
|
|||
) : ReactionService {
|
||||
override suspend fun receiveReaction(name: String, domain: String, userId: Long, postId: Long) {
|
||||
if (reactionQueryService.reactionAlreadyExist(postId, userId, 0).not()) {
|
||||
|
||||
try {
|
||||
reactionRepository.save(
|
||||
Reaction(reactionRepository.generateId(), 0, postId, userId)
|
||||
|
|
Loading…
Reference in New Issue