mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-26 04:22:38 +00:00
[F] Fix AllNet Wacca path
This commit is contained in:
parent
3663eb63e7
commit
aa1caacfd6
@ -2,8 +2,8 @@ package icu.samnyan.aqua.sega.allnet
|
|||||||
|
|
||||||
import ext.*
|
import ext.*
|
||||||
import icu.samnyan.aqua.net.db.AquaNetUserRepo
|
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.AllNetBillingDecoder.decodeAllNet
|
||||||
|
import icu.samnyan.aqua.sega.util.AquaConst
|
||||||
import jakarta.servlet.http.HttpServletRequest
|
import jakarta.servlet.http.HttpServletRequest
|
||||||
import jakarta.servlet.http.HttpServletResponse
|
import jakarta.servlet.http.HttpServletResponse
|
||||||
import org.slf4j.Logger
|
import org.slf4j.Logger
|
||||||
@ -175,7 +175,7 @@ class AllNet(
|
|||||||
"SDDT" -> "ongeki/"
|
"SDDT" -> "ongeki/"
|
||||||
"SDEY" -> "mai/"
|
"SDEY" -> "mai/"
|
||||||
"SDEZ" -> "mai2/"
|
"SDEZ" -> "mai2/"
|
||||||
"SDFE" -> "wacca/"
|
"SDFE" -> "wacca" // Note: Wacca must not end with a trailing slash
|
||||||
"SDED" -> "card/"
|
"SDED" -> "card/"
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,8 @@ class WaccaServer {
|
|||||||
@API("/api/**")
|
@API("/api/**")
|
||||||
fun handle(req: HttpServletRequest, @RB body: String): Any {
|
fun handle(req: HttpServletRequest, @RB body: String): Any {
|
||||||
return try {
|
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 cacheMap) return resp(cacheMap[path]!!)
|
||||||
if (path !in handlerMap) return resp("[]", 1, "Not Found")
|
if (path !in handlerMap) return resp("[]", 1, "Not Found")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user