Fix initializer

This commit is contained in:
2025-07-24 01:16:06 +03:00
parent c51421ceb0
commit bbaec5af71

View File

@@ -15,9 +15,9 @@ class IndexInitializer(val fileUploaderService: FileUploaderService) {
@EventListener @EventListener
fun applicationStartedHandler(event: ApplicationStartedEvent) { fun applicationStartedHandler(event: ApplicationStartedEvent) {
try { try {
val fileBytes = readResourceAsByteArray("static/index.html") val fileBytes = readResourceAsByteArray("/static/index.html")
fileUploaderService.uploadFile(fileBytes, "index.html", "text/html") fileUploaderService.uploadFile(fileBytes, "index.html", "text/html")
} catch (e: Error) { } catch (e: Exception) {
logger.warn(e) { "Failed to upload " } logger.warn(e) { "Failed to upload " }
} }
} }