Skip to content

Commit

Permalink
使用apiKey登录Web
Browse files Browse the repository at this point in the history
  • Loading branch information
adlered committed Oct 29, 2024
1 parent 06b5006 commit 3458cbb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/b3log/symphony/processor/ApiProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ public void loginWebInApiKey(final RequestContext context) {

if (null != currentUser) {
final Response response = context.getResponse();
response.sendRedirect(Latkes.getServePath());
String r = context.param("r");
if (null == r) {
r = "/";
}
response.sendRedirect(Latkes.getServePath() + r);
Sessions.login(response, currentUser.optString(Keys.OBJECT_ID), true);
} else {
context.renderJSON(StatusCodes.ERR).renderMsg("ApiKey 错误。");
Expand Down

0 comments on commit 3458cbb

Please sign in to comment.