redid database structures and now running SQLite and Seqelize
This commit is contained in:
@@ -9,12 +9,13 @@ let app;
|
||||
export class Router {
|
||||
static async initEndpoints() {
|
||||
Logger.info('Setting up API HTTP endpoints');
|
||||
|
||||
|
||||
app = Server.App;
|
||||
|
||||
app.get('/', [MiddleWare.analytics, Router.frontPage]);
|
||||
|
||||
app.get('/user/:id', (req, res) => [MiddleWare.analytics]);
|
||||
app.delete('/user/:id', (req, res) => {});
|
||||
app.get('/user/:id', [MiddleWare.analytics]);
|
||||
app.delete('/user/:id', [MiddleWare.analytics]);
|
||||
app.post('/user', [MiddleWare.analytics, Controllers.UserController.newUser]);
|
||||
|
||||
app.use([MiddleWare.analytics, StatusCodes.pageNotFound]);
|
||||
|
||||
@@ -4,6 +4,11 @@ import {ControllerHandler} from './controllerHandler';
|
||||
export class UserController extends ControllerHandler {
|
||||
static newUser(req, res, next) {
|
||||
Logger.info('NEW USER');
|
||||
|
||||
let username = req.body.username || null;
|
||||
let email = req.body.email || null;
|
||||
let password = req.body.password || null;
|
||||
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user