[F] Fix AllNet Wacca path

This commit is contained in:
Azalea
2024-03-29 00:09:40 -04:00
parent 3663eb63e7
commit aa1caacfd6
2 changed files with 4 additions and 3 deletions

View File

@@ -74,7 +74,8 @@ class WaccaServer {
@API("/api/**")
fun handle(req: HttpServletRequest, @RB body: String): Any {
return try {
val path = req.requestURI.removePrefix("/g/wacca").removePrefix("/api").removePrefix("/").lowercase()
val path = req.requestURI.removePrefix("/g/wacca").removePrefix("/WaccaServlet")
.removePrefix("/api").removePrefix("/").lowercase()
if (path in cacheMap) return resp(cacheMap[path]!!)
if (path !in handlerMap) return resp("[]", 1, "Not Found")