Skip to content

Commit

Permalink
inbox
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Oct 25, 2024
1 parent 1c0a839 commit baf554c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/link/locutus/discord/web/WebUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void mailLogin(DBNation nation, boolean backend, boolean allowExis
if (mails.size() > 0) {
mailUrl = Settings.INSTANCE.PNW_URL() + "/inbox/message/id=" + mails.get(0).id;
} else {
mailUrl = Settings.INSTANCE.PNW_URL() + "/mail/inbox";
mailUrl = Settings.INSTANCE.PNW_URL() + "/inbox/";
}
throw new RedirectResponse(HttpStatus.SEE_OTHER, mailUrl);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ record = WebRoot.db().get(uuid);
UUID uuid = UUID.fromString(token);
if (record == null || !record.getUUID().equals(uuid)) {
record = WebRoot.db().get(uuid);
WebUtil.setCookie(context, PageHandler.CookieType.URL_AUTH.getCookieId(), uuid.toString(), (int) TimeUnit.DAYS.toSeconds(Settings.INSTANCE.WEB.SESSION_TIMEOUT_DAYS));
if (record != null) {
isLoginPage = false;
WebUtil.setCookie(context, PageHandler.CookieType.URL_AUTH.getCookieId(), uuid.toString(), (int) TimeUnit.DAYS.toSeconds(Settings.INSTANCE.WEB.SESSION_TIMEOUT_DAYS));
}
}
} catch (IllegalArgumentException e) {
e.printStackTrace();
Expand Down

0 comments on commit baf554c

Please sign in to comment.