unified auth exceptions, added syncdata and selfinfo

This commit is contained in:
mrfry 2023-04-12 09:27:44 +02:00
parent ac01455510
commit d99bb0fedc
5 changed files with 13 additions and 30 deletions

View file

@ -1037,7 +1037,7 @@ function setup(data: SubmoduleData): Submodule {
app.get('/syncp2pdata', (req: Request, res: Response) => {
logger.LogReq(req)
const user = req.session.user
if (user.id !== 1) {
if (!user || user.id !== 1) {
res.json({
status: 'error',
msg: 'only user 1 can call this EP',