From 0b6610c062a4f7cfece277233e19dfd61bcd56fb Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 29 Aug 2023 13:36:57 +0100 Subject: [PATCH] Replace use of deprecated static/resources methods Signed-off-by: Graham --- archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt b/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt index 67fc822e8b..6cc9dea8c6 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt @@ -9,8 +9,7 @@ import io.ktor.server.application.call import io.ktor.server.application.createApplicationPlugin import io.ktor.server.application.install import io.ktor.server.engine.embeddedServer -import io.ktor.server.http.content.resources -import io.ktor.server.http.content.static +import io.ktor.server.http.content.staticResources import io.ktor.server.jetty.Jetty import io.ktor.server.plugins.autohead.AutoHeadResponse import io.ktor.server.plugins.cachingheaders.CachingHeaders @@ -89,7 +88,7 @@ public class WebServer @Inject constructor( post("/keys") { keysController.import(call) } get("/keys/all.json") { keysController.exportAll(call) } get("/keys/valid.json") { keysController.exportValid(call) } - static("/static") { resources("/org/openrs2/archive/static") } + staticResources("/static", "/org/openrs2/archive/static") // compatibility redirects get("/caches/{id}") { redirect(call, permanent = true, "/caches/runescape/{id}") }