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:
parent
ac01455510
commit
d99bb0fedc
5 changed files with 13 additions and 30 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue