- 升级vertx到4.5.6

- 添加Cloudreve
- 蓝奏云优享和小飞机规则修改
This commit is contained in:
qaiu
2024-04-09 12:13:26 +08:00
parent 8358d8d1f8
commit 5768ba48e8
15 changed files with 223 additions and 49 deletions

View File

@@ -37,9 +37,9 @@ public class ServerApi {
"&code=" + request.getParam("code") + "&k=" + request.getParam("k") +
"&fweb=" + request.getParam("fweb") + "&cl=" + request.getParam("cl");
}
IPanTool.shareURLPrefixMatching(url, pwd).parse().onSuccess(resUrl -> {
ResponseUtil.redirect(response, resUrl, promise);
}).onFailure(t -> promise.fail(t.fillInStackTrace()));
IPanTool.shareURLPrefixMatching(url, pwd).parse()
.onSuccess(resUrl -> ResponseUtil.redirect(response, resUrl, promise))
.onFailure(t -> promise.fail(t.fillInStackTrace()));
return promise.future();
}
@@ -52,6 +52,16 @@ public class ServerApi {
return IPanTool.shareURLPrefixMatching(url, pwd).parse();
}
@RouteMapping(value = "/json/:type/:key", method = RouteMethod.GET, order = 2)
public Future<String> parseKeyJson(String type, String key) {
String code = "";
if (key.contains("@")) {
String[] keys = key.split("@");
key = keys[0];
code = keys[1];
}
return IPanTool.typeMatching(type, key, code).parse();
}
@RouteMapping(value = "/:type/:key", method = RouteMethod.GET, order = 1)
public Future<Void> parseKey(HttpServerResponse response, String type, String key) {
@@ -69,14 +79,4 @@ public class ServerApi {
return promise.future();
}
@RouteMapping(value = "/json/:type/:key", method = RouteMethod.GET, order = 2)
public Future<String> parseKeyJson(String type, String key) {
String code = "";
if (key.contains("@")) {
String[] keys = key.split("@");
key = keys[0];
code = keys[1];
}
return IPanTool.typeMatching(type, key, code).parse();
}
}