Ajout du dossier 'routes'

This commit is contained in:
Rampeur
2025-08-08 19:22:30 +02:00
parent d477cf239c
commit 16b2de084b
5 changed files with 95 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
const express = require("express");
const router = express.Router();
const {
getProfile,
followUser,
unfollowUser,
} = require("../controllers/profiles");
const { protect } = require("../middlewares/auth");
router.route("/profiles/:username").get(protect, getProfile);
router
.route("/profiles/:username/follow")
.post(protect, followUser)
.delete(protect, unfollowUser);
module.exports = router;