mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-10-11 09:14:25 +00:00
Fix JsonResult API calls and add documentation
Co-authored-by: qaiu <[email protected]>
This commit is contained in:
co-authored by
qaiu
parent
6305d805dd
commit
bec342d778
@@ -80,7 +80,7 @@ public class PlaygroundApi {
|
||||
.put("public", config.isPublic())
|
||||
.put("authed", authed);
|
||||
|
||||
return Future.succeededFuture(JsonResult.ok(result).toJsonObject());
|
||||
return Future.succeededFuture(JsonResult.data(result).toJsonObject());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,7 +99,7 @@ public class PlaygroundApi {
|
||||
if (session != null) {
|
||||
session.put(SESSION_AUTH_KEY, true);
|
||||
}
|
||||
promise.complete(JsonResult.ok("公开模式,无需密码").toJsonObject());
|
||||
promise.complete(JsonResult.success("公开模式,无需密码").toJsonObject());
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class PlaygroundApi {
|
||||
if (session != null) {
|
||||
session.put(SESSION_AUTH_KEY, true);
|
||||
}
|
||||
promise.complete(JsonResult.ok("登录成功").toJsonObject());
|
||||
promise.complete(JsonResult.success("登录成功").toJsonObject());
|
||||
} else {
|
||||
promise.complete(JsonResult.error("密码错误").toJsonObject());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user