Authentication and authorization
This commit is contained in:
committed by
Andrew Trieu
parent
8dd54efa6d
commit
ab526cca2a
@@ -8,6 +8,9 @@ import helmet from "helmet";
|
||||
import morgan from "morgan";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import authRoutes from "./routes/auth.js";
|
||||
/* Controllers */
|
||||
import { register } from "./controllers/auth.js";
|
||||
|
||||
/**
|
||||
* Config
|
||||
@@ -38,6 +41,11 @@ const storage = multer.diskStorage({
|
||||
});
|
||||
const upload = multer({ storage });
|
||||
|
||||
/**
|
||||
* Routes
|
||||
* */
|
||||
app.post("/auth/register", upload.single("profilePicture"), register);
|
||||
|
||||
/**
|
||||
* Database
|
||||
* */
|
||||
|
||||
Reference in New Issue
Block a user