fix: Userのinbox/outbox/urlを修正

This commit is contained in:
usbharu 2023-04-28 23:06:07 +09:00
parent c93a00cd4b
commit bd122ea164
2 changed files with 6 additions and 6 deletions

View File

@ -67,9 +67,9 @@ class UserService(private val userRepository: IUserRepository, private val userA
screenName = user.screenName, screenName = user.screenName,
description = user.description, description = user.description,
password = HashedPassword, password = HashedPassword,
inbox = "${Config.configData.url}/users/$nextId/inbox", inbox = "${Config.configData.url}/users/${user.name}/inbox",
outbox = "${Config.configData.url}/users/$nextId/outbox", outbox = "${Config.configData.url}/users/${user.name}/outbox",
url = "${Config.configData.url}/users/$nextId", url = "${Config.configData.url}/users/${user.name}",
publicKey = keyPair.public.toPem(), publicKey = keyPair.public.toPem(),
privateKey = keyPair.private.toPem(), privateKey = keyPair.private.toPem(),
Instant.now() Instant.now()

View File

@ -39,10 +39,10 @@ class UserServiceTest{
assertEquals("XXXXXXXXXXXXX", firstValue.description) assertEquals("XXXXXXXXXXXXX", firstValue.description)
assertEquals("hashedPassword", firstValue.password) assertEquals("hashedPassword", firstValue.password)
assertEquals(110001L, firstValue.id) assertEquals(110001L, firstValue.id)
assertEquals("https://example.com/users/110001", firstValue.url) assertEquals("https://example.com/users/test", firstValue.url)
assertEquals("example.com", firstValue.domain) assertEquals("example.com", firstValue.domain)
assertEquals("https://example.com/users/110001/inbox", firstValue.inbox) assertEquals("https://example.com/users/test/inbox", firstValue.inbox)
assertEquals("https://example.com/users/110001/outbox", firstValue.outbox) assertEquals("https://example.com/users/test/outbox", firstValue.outbox)
assertEquals(generateKeyPair.public.toPem(),firstValue.publicKey) assertEquals(generateKeyPair.public.toPem(),firstValue.publicKey)
assertEquals(generateKeyPair.private.toPem(),firstValue.privateKey) assertEquals(generateKeyPair.private.toPem(),firstValue.privateKey)
} }