mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 07:56:23 +00:00
New auth endpoints
This commit is contained in:
parent
8523ee6ac0
commit
ab64208c57
@ -3,6 +3,7 @@ const routes = require('express').Router()
|
||||
const uploadController = require('../controllers/uploadController')
|
||||
const albumsController = require('../controllers/albumsController')
|
||||
const tokenController = require('../controllers/tokenController')
|
||||
const authController = require('../controllers/authController')
|
||||
|
||||
routes.get ('/check', (req, res, next) => {
|
||||
return res.json({
|
||||
@ -11,6 +12,11 @@ routes.get ('/check', (req, res, next) => {
|
||||
})
|
||||
})
|
||||
|
||||
routes.post ('/login', (req, res, next) => authController.verify(req, res, next))
|
||||
routes.post ('/register', (req, res, next) => authController.register(req, res, next))
|
||||
|
||||
routes.post ('/upload', (req, res, next) => uploadController.upload(req, res, next))
|
||||
|
||||
routes.get ('/uploads', (req, res, next) => uploadController.list(req, res))
|
||||
routes.get ('/uploads/:page', (req, res, next) => uploadController.list(req, res))
|
||||
routes.post ('/upload', (req, res, next) => uploadController.upload(req, res, next))
|
||||
|
Loading…
Reference in New Issue
Block a user