mirror of https://github.com/usbharu/Hideout.git
This commit is contained in:
parent
ad9a4852f3
commit
5ab62d1250
|
@ -14,6 +14,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@file:Suppress("SpringJavaInjectionPointsAutowiringInspection")
|
||||||
|
|
||||||
package mastodon.account
|
package mastodon.account
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference
|
import com.fasterxml.jackson.core.type.TypeReference
|
||||||
|
@ -41,6 +43,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders
|
||||||
import org.springframework.transaction.annotation.Transactional
|
import org.springframework.transaction.annotation.Transactional
|
||||||
import org.springframework.web.context.WebApplicationContext
|
import org.springframework.web.context.WebApplicationContext
|
||||||
|
|
||||||
|
@Suppress("NonAsciiCharacters")
|
||||||
@SpringBootTest(classes = [SpringApplication::class])
|
@SpringBootTest(classes = [SpringApplication::class])
|
||||||
@AutoConfigureMockMvc
|
@AutoConfigureMockMvc
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -48,6 +51,7 @@ import org.springframework.web.context.WebApplicationContext
|
||||||
@Sql("/sql/test-user2.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS)
|
@Sql("/sql/test-user2.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS)
|
||||||
@Sql("/sql/accounts/test-accounts-statuses.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS)
|
@Sql("/sql/accounts/test-accounts-statuses.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS)
|
||||||
class AccountApiPaginationTest {
|
class AccountApiPaginationTest {
|
||||||
|
@Suppress("SpringJavaInjectionPointsAutowiringInspection")
|
||||||
@Autowired
|
@Autowired
|
||||||
private lateinit var context: WebApplicationContext
|
private lateinit var context: WebApplicationContext
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ abstract class AbstractApplicationService<T : Any, R>(
|
||||||
) : ApplicationService<T, R> {
|
) : ApplicationService<T, R> {
|
||||||
override suspend fun execute(command: T, executor: CommandExecutor): R {
|
override suspend fun execute(command: T, executor: CommandExecutor): R {
|
||||||
return try {
|
return try {
|
||||||
logger.debug("START ${command::class.simpleName} by $executor")
|
logger.debug("START {} by {}", command::class.simpleName, executor)
|
||||||
val response = transaction.transaction<R> {
|
val response = transaction.transaction<R> {
|
||||||
internalExecute(command, executor)
|
internalExecute(command, executor)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
package dev.usbharu.hideout.core.domain.model.filter
|
package dev.usbharu.hideout.core.domain.model.filter
|
||||||
|
|
||||||
class FilterResult(val filter: Filter, val matchedKeyword: String) {
|
class FilterResult(val filter: Filter, val matchedKeyword: String)
|
||||||
}
|
|
|
@ -32,9 +32,7 @@ class AuthController(
|
||||||
private val springMvcCommandExecutorFactory: SpringMvcCommandExecutorFactory,
|
private val springMvcCommandExecutorFactory: SpringMvcCommandExecutorFactory,
|
||||||
) {
|
) {
|
||||||
@GetMapping("/auth/sign_up")
|
@GetMapping("/auth/sign_up")
|
||||||
fun signUp(): String {
|
fun signUp(): String = "sign_up"
|
||||||
return "sign_up"
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/auth/sign_up")
|
@PostMapping("/auth/sign_up")
|
||||||
suspend fun signUp(@Validated @ModelAttribute signUpForm: SignUpForm, request: HttpServletRequest): String {
|
suspend fun signUp(@Validated @ModelAttribute signUpForm: SignUpForm, request: HttpServletRequest): String {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#file: noinspection SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection
|
||||||
hideout:
|
hideout:
|
||||||
url: "https://test-hideout-dev.usbharu.dev"
|
url: "https://test-hideout-dev.usbharu.dev"
|
||||||
use-mongodb: true
|
use-mongodb: true
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
package dev.usbharu.hideout.core.domain.model.actor
|
package dev.usbharu.hideout.core.domain.model.actor
|
||||||
|
|
||||||
class ActorDescriptionTest {
|
class ActorDescriptionTest
|
||||||
|
|
||||||
}
|
|
|
@ -193,7 +193,7 @@ class PostTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun hideがtrueのときcontetnがemptyを返す() {
|
fun hideがtrueのときcontentがemptyを返す() {
|
||||||
val post = TestPostFactory.create(hide = true)
|
val post = TestPostFactory.create(hide = true)
|
||||||
|
|
||||||
assertEquals(PostContent.empty, post.content)
|
assertEquals(PostContent.empty, post.content)
|
||||||
|
|
|
@ -17,12 +17,7 @@
|
||||||
package dev.usbharu.hideout.mastodon.interfaces.api
|
package dev.usbharu.hideout.mastodon.interfaces.api
|
||||||
|
|
||||||
import dev.usbharu.hideout.mastodon.interfaces.api.generated.TimelineApi
|
import dev.usbharu.hideout.mastodon.interfaces.api.generated.TimelineApi
|
||||||
import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.Status
|
|
||||||
import kotlinx.coroutines.flow.Flow
|
|
||||||
import org.springframework.http.ResponseEntity
|
|
||||||
import org.springframework.stereotype.Controller
|
import org.springframework.stereotype.Controller
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
class SpringTimelineApi : TimelineApi {
|
class SpringTimelineApi : TimelineApi
|
||||||
|
|
||||||
}
|
|
|
@ -1540,7 +1540,7 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
moved:
|
moved:
|
||||||
type: boolean
|
type: boolean
|
||||||
suspendex:
|
suspended:
|
||||||
type: boolean
|
type: boolean
|
||||||
limited:
|
limited:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
Loading…
Reference in New Issue