mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-02-03 03:46:18 +00:00
fix: 修复 /json/parser 路由优先级问题
- 将 /json/parser 路由的 order 从 -1 改为 2000 - 确保优先于通配符路由 /json/:type/:key (order=1000) 注册 - 修复了接口返回 500 错误的问题
This commit is contained in:
@@ -42,7 +42,8 @@ public class ServerApi {
|
|||||||
return promise.future();
|
return promise.future();
|
||||||
}
|
}
|
||||||
|
|
||||||
@RouteMapping(value = "/json/parser", method = RouteMethod.GET, order = 1)
|
// order=2000 确保此路由优先于 /json/:type/:key 匹配(数字越大越先注册)
|
||||||
|
@RouteMapping(value = "/json/parser", method = RouteMethod.GET, order = 2000)
|
||||||
public Future<CacheLinkInfo> parseJson(HttpServerRequest request, String pwd) {
|
public Future<CacheLinkInfo> parseJson(HttpServerRequest request, String pwd) {
|
||||||
String url = URLParamUtil.parserParams(request);
|
String url = URLParamUtil.parserParams(request);
|
||||||
return cacheService.getCachedByShareUrlAndPwd(url, pwd, JsonObject.of("UA",request.headers().get("user-agent")));
|
return cacheService.getCachedByShareUrlAndPwd(url, pwd, JsonObject.of("UA",request.headers().get("user-agent")));
|
||||||
|
|||||||
Reference in New Issue
Block a user