mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
backend: auth checks
This commit is contained in:
parent
5025a43dbd
commit
c456f938b1
6 changed files with 59 additions and 29 deletions
|
@ -1,6 +1,6 @@
|
|||
const { UserModel } = require('../../config/db');
|
||||
const { User } = require('../../models/User');
|
||||
|
||||
module.exports = (req, res) => UserModel.find((err, articles) => {
|
||||
module.exports = (req, res) => User.find((err, articles) => {
|
||||
if (!err) return res.send(articles);
|
||||
|
||||
res.statusCode = 500;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue