From 854ec336cc6a0a3bb60f33acfac28ed45b491a15 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 14 Oct 2024 00:07:21 +0200 Subject: Add /firm exporthotm to save hotm presets --- src/main/kotlin/util/TemplateUtil.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/util/TemplateUtil.kt') 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 encodeTemplate(sharePrefix: String, data: T, serializer: SerializationStrategy): String { require(sharePrefix.endsWith("/")) - return intoBase64Encoded(sharePrefix + Firmament.json.encodeToString(serializer, data)) + return intoBase64Encoded(sharePrefix + Firmament.tightJson.encodeToString(serializer, data)) } inline fun maybeDecodeTemplate(sharePrefix: String, data: String): T? = -- cgit