mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-12 20:34:36 +01:00
fix CN Client cannot modify nickname through /user/set-info
This commit is contained in:
@@ -162,9 +162,9 @@ public class HttpServer {
|
||||
|
||||
getApp().post("/user/detail", new UserLoginHandler());
|
||||
getApp().post("/user/set", new UserSetDataHandler());
|
||||
getApp().post("/user/set-info", new UserSetDataHandler()); // CN
|
||||
getApp().post("/user/login", new UserLoginHandler());
|
||||
getApp().post("/user/quick-login", new UserLoginHandler());
|
||||
getApp().post("/user/set-info", new HttpJsonResponse("{\"Code\":200,\"Data\":{},\"Msg\":\"OK\"}"));
|
||||
getApp().post("/user/send-sms", new HttpJsonResponse("{\"Code\":200,\"Data\":{},\"Msg\":\"OK\"}"));
|
||||
|
||||
getApp().post("/yostar/get-auth", new GetAuthHandler());
|
||||
|
||||
@@ -32,7 +32,8 @@ public class UserSetDataHandler extends UserLoginHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.Key.equals("Nickname")) {
|
||||
// OS uses the former, CN uses the latter
|
||||
if (req.Key.equals("Nickname") || req.Key.equals("nickname")) {
|
||||
account.setNickname(req.Value);
|
||||
account.save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user