mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
backend: auth bug fix
This commit is contained in:
parent
d932fcb287
commit
c92f84c24f
7 changed files with 12 additions and 81 deletions
|
@ -6,7 +6,7 @@ module.exports = async (req, res) => {
|
|||
const { body, body: { id, token, force } } = req;
|
||||
|
||||
const owner = await User.findOne({ _id: id, token });
|
||||
if (!owner) return res.send({ success: false, reason: 'Unauthorized' });
|
||||
if (!owner) return res.send({ success: false, reason: 'unauthorized', id, token });
|
||||
|
||||
const title = parseString(body.title, 32);
|
||||
const address = parseString(body.address, 32);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue