aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/TemplateUtil.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-10-14 00:07:21 +0200
committerLinnea Gräf <nea@nea.moe>2024-10-14 00:07:21 +0200
commit854ec336cc6a0a3bb60f33acfac28ed45b491a15 (patch)
tree257e5a44f6cf2c4e12894a53dd6c99491f18f438 /src/main/kotlin/util/TemplateUtil.kt
parenta40c50b99186d425b3fcf42336940c29b97a8219 (diff)
downloadfirmament-854ec336cc6a0a3bb60f33acfac28ed45b491a15.tar.gz
firmament-854ec336cc6a0a3bb60f33acfac28ed45b491a15.tar.bz2
firmament-854ec336cc6a0a3bb60f33acfac28ed45b491a15.zip
Add /firm exporthotm to save hotm presets
Diffstat (limited to 'src/main/kotlin/util/TemplateUtil.kt')
-rw-r--r--src/main/kotlin/util/TemplateUtil.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/util/TemplateUtil.kt b/src/main/kotlin/util/TemplateUtil.kt
index 11100e9..f4ff37c 100644
--- a/src/main/kotlin/util/TemplateUtil.kt
+++ b/src/main/kotlin/util/TemplateUtil.kt
@@ -5,6 +5,7 @@ package moe.nea.firmament.util
import java.util.*
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerializationStrategy
+import kotlinx.serialization.json.Json
import kotlinx.serialization.serializer
import moe.nea.firmament.Firmament
@@ -61,7 +62,7 @@ object TemplateUtil {
fun <T> encodeTemplate(sharePrefix: String, data: T, serializer: SerializationStrategy<T>): String {
require(sharePrefix.endsWith("/"))
- return intoBase64Encoded(sharePrefix + Firmament.json.encodeToString(serializer, data))
+ return intoBase64Encoded(sharePrefix + Firmament.tightJson.encodeToString(serializer, data))
}
inline fun <reified T : Any> maybeDecodeTemplate(sharePrefix: String, data: String): T? =