From 616cc9ce6a63c0c363f329c4188e03d45ebac439 Mon Sep 17 00:00:00 2001 From: qaiu <736226400@qq.com> Date: Tue, 13 Jun 2023 08:22:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/qaiu/lz/web/http/ServerApi.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/web-service/src/main/java/cn/qaiu/lz/web/http/ServerApi.java b/web-service/src/main/java/cn/qaiu/lz/web/http/ServerApi.java index b0c2f1c..eba32c0 100644 --- a/web-service/src/main/java/cn/qaiu/lz/web/http/ServerApi.java +++ b/web-service/src/main/java/cn/qaiu/lz/web/http/ServerApi.java @@ -55,16 +55,16 @@ public class ServerApi { } - @RouteMapping(value = "/:type/:id", method = RouteMethod.GET) - public void YeParse(HttpServerResponse response, String type, String id) { + @RouteMapping(value = "/:type/:key", method = RouteMethod.GET) + public void parse(HttpServerResponse response, String type, String key) { String code = ""; - if (id.contains("@")) { - String[] ids = id.split("@"); - id = ids[0]; - code = ids[1]; + if (key.contains("@")) { + String[] keys = key.split("@"); + key = keys[0]; + code = keys[1]; } - IPanTool.typeMatching(type).parse(id, code).onSuccess(resUrl -> response.putHeader("location", resUrl) + IPanTool.typeMatching(type).parse(key, code).onSuccess(resUrl -> response.putHeader("location", resUrl) .setStatusCode(302).end()).onFailure(t -> { response.putHeader(CONTENT_TYPE, "text/html;charset=utf-8"); response.end(t.getMessage()); @@ -72,13 +72,13 @@ public class ServerApi { } @RouteMapping(value = "/json/:type/:id", method = RouteMethod.GET) - public Future YeParseJson(HttpServerResponse response, String type, String id) { + public Future parseJson(HttpServerResponse response, String type, String key) { String code = ""; - if (id.contains("@")) { - String[] ids = id.split("@"); - id = ids[0]; - code = ids[1]; + if (key.contains("@")) { + String[] keys = key.split("@"); + key = keys[0]; + code = keys[1]; } - return IPanTool.typeMatching(type).parse(id, code); + return IPanTool.typeMatching(type).parse(key, code); } }