[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

@ -2,8 +2,8 @@ package icu.samnyan.aqua.sega.allnet
import ext.*
import icu.samnyan.aqua.net.db.AquaNetUserRepo
import icu.samnyan.aqua.sega.util.AquaConst
import icu.samnyan.aqua.sega.util.AllNetBillingDecoder.decodeAllNet
import icu.samnyan.aqua.sega.util.AquaConst
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.slf4j.Logger
@ -175,7 +175,7 @@ class AllNet(
"SDDT" -> "ongeki/"
"SDEY" -> "mai/"
"SDEZ" -> "mai2/"
"SDFE" -> "wacca/"
"SDFE" -> "wacca" // Note: Wacca must not end with a trailing slash
"SDED" -> "card/"
else -> ""
}

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")