extending session whenever tags are queries – should be the case on most pages
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user