extending session whenever tags are queries – should be the case on most pages

This commit is contained in:
2025-07-28 16:32:07 +02:00
parent 4e9f15c6a3
commit 378ef640d9
3 changed files with 11 additions and 7 deletions

View File

@@ -63,8 +63,7 @@ public class TagModule extends BaseHandler implements TagService {
public boolean doGet(Path path, HttpExchange ex) throws IOException {
addCors(ex);
try {
Optional<Token> token = SessionToken.from(ex).map(Token::of);
var user = users.loadUser(token);
var user = users.refreshSession(ex);
if (user.isEmpty()) return unauthorized(ex);
var module = path.pop();
if (module == null) throw unprocessable("Module missing in path.");