Skip to content
Permalink
670f1588d0
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
50 lines (34 sloc) 867 Bytes
import express from "express";
import {
createClub,
getAllClub,
updateClub,
getClub,
deleteClubs,
countByType,
featuredClub,
searchQ,
registerClub,
} from "../controllers/club.js";
import { verifyAdmin, verifyUser} from "../utils/verifyToken.js";
const router = express.Router();
//CRUD
//Create
router.post('/create-club',verifyAdmin, createClub)
//update
router.put("/update/:id", verifyAdmin, updateClub);
//update user
router.put("/update-user/:id",verifyUser,registerClub)
//delete
router.delete("/delete/:id", verifyAdmin, deleteClubs);
//get
router.get("/get/:id", getClub);
//get list
router.get("/getAll", getAllClub);
router.get("/countByClubs", getAllClub);
router.get("/countByType", countByType);
//Featured Club
router.get("/featured", featuredClub);
//search
router.get("/search", searchQ);
export default router;