mirror of
https://github.com/pischule/memevizor.git
synced 2025-12-19 06:56:42 +00:00
Fix initializer
This commit is contained in:
@@ -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 " }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user