mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-08 03:28:50 +00:00
added endpoint to get postIds from user
This commit is contained in:
parent
ece95c7130
commit
78a40c35cb
4 changed files with 93 additions and 19 deletions
|
@ -3,7 +3,7 @@ import { Client } from "minio";
|
|||
import dotenv from "dotenv";
|
||||
import userRouter from "./routes/userRoutes";
|
||||
import postRouter from "./routes/postRoutes";
|
||||
//import postController from "./controllers/postController";
|
||||
import { authenticateToken } from "./middleware/authenticateToken";
|
||||
import bodyParser from "body-parser";
|
||||
|
||||
dotenv.config();
|
||||
|
@ -59,7 +59,7 @@ app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(specs));
|
|||
|
||||
app.use(bodyParser.json());
|
||||
app.use("/api/user", userRouter);
|
||||
app.use("/api/posts", postRouter);
|
||||
app.use("/api/posts", authenticateToken(), postRouter);
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Server läuft auf http://localhost:${port}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue