fix: guest mode pid not being set correctly

This commit is contained in:
Jemma Poffinbarger
2025-01-20 19:51:44 -06:00
parent 1e2b7a8ed3
commit 08dae2f536

View File

@@ -37,6 +37,7 @@ async function webAuth(request, response, next) {
(isStartOfPath(request.path, '/posts/') && !request.path.includes('/empathy'))) {
if (!request.pid && request.guest_access && !request.isWrite) {
request.pid = 1000000000;
response.locals.pid = request.pid;
return next();
} else if (!request.pid) {
return response.redirect('/login');