mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-08 03:28:50 +00:00
added endpoints for profile and feed
This commit is contained in:
parent
9e6eeb27fd
commit
1800056918
22 changed files with 952 additions and 110 deletions
|
@ -3,7 +3,8 @@ import { Client } from "minio";
|
|||
import dotenv from "dotenv";
|
||||
import userRouter from "./routes/userRoutes";
|
||||
import postRouter from "./routes/postRoutes";
|
||||
import { authenticateToken } from "./middleware/authenticateToken";
|
||||
import profileRouter from "./routes/profileRoutes";
|
||||
import followerRouter from "./routes/followerRoutes";
|
||||
import bodyParser from "body-parser";
|
||||
import cors from "cors";
|
||||
dotenv.config();
|
||||
|
@ -30,6 +31,7 @@ export const minioClient = new Client({
|
|||
import swaggerJSDoc from "swagger-jsdoc";
|
||||
import swaggerUi from "swagger-ui-express";
|
||||
import { deleteExpiredTokens } from "./tasks/deleteTokens";
|
||||
import feedRouter from "./routes/feedRoutes";
|
||||
|
||||
const options = {
|
||||
definition: {
|
||||
|
@ -75,8 +77,10 @@ setInterval(
|
|||
);
|
||||
app.use(bodyParser.json());
|
||||
app.use("/api/user", userRouter);
|
||||
app.use("/api/posts", authenticateToken(), postRouter);
|
||||
|
||||
app.use("/api/posts", postRouter);
|
||||
app.use("/api/profile", profileRouter);
|
||||
app.use("/api/feed", feedRouter);
|
||||
app.use("/api/follower/", followerRouter);
|
||||
app.listen(port, () => {
|
||||
console.log(`Server läuft auf http://localhost:${port}`);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue