add follow function and make small style changes

This commit is contained in:
luisa.bellitto 2025-06-29 15:15:48 +02:00 committed by Rudi Regentonne
parent fdaf575367
commit 0576a76cb5
8 changed files with 57 additions and 19 deletions

View file

@ -10,6 +10,7 @@ const profileRouter = express.Router();
import { upload } from "../middleware/uploadSingle";
import { updateBioSchema } from "../schemas/profileSchemas";
import { validateData } from "../middleware/validationMiddleware";
import { optionalAuthenticateToken } from "../middleware/optionalAuthenticateToken";
/**
* @swagger
* /api/profile/uploadProfilePicture:
@ -124,5 +125,5 @@ profileRouter.put(
* 401:
* description: Ungültige Anmeldedaten
*/
profileRouter.get("/:username", getProfile);
profileRouter.get("/:username", optionalAuthenticateToken, getProfile);
export default profileRouter;