Finish avatar api

This commit is contained in:
2023-11-27 18:17:45 +08:00
parent e997396663
commit bffd72b467
9 changed files with 109 additions and 69 deletions

View File

@@ -10,9 +10,6 @@ import top.fatweb.api.properties.SecurityProperties
import top.fatweb.api.util.ByteUtil
import top.fatweb.api.util.JwtUtil
import top.fatweb.api.util.StrUtil
import top.fatweb.avatargenerator.GitHubAvatar
import kotlin.io.encoding.Base64
import kotlin.io.encoding.ExperimentalEncodingApi
@ExtendWith(SpringExtension::class)
@@ -45,14 +42,6 @@ class FatWebApiApplicationTests {
assertEquals("1.5MiB", ByteUtil.formatByteSize(1 * 1024 * 1024 + 512 * 1024))
}
@OptIn(ExperimentalEncodingApi::class)
@Test
fun name() {
val avatar = GitHubAvatar.newAvatarBuilder(396, 5).build()
val bytes = avatar.createAsPngBytes(1232132134543L)
logger.info(Base64.encode(bytes))
}
@Test
fun upperToUnderLetterTest() {
assertEquals("create_time", StrUtil.upperToUnderLetter("createTime"))