mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
unified auth exceptions, added syncdata and selfinfo
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user