15 lines
577 B
JavaScript
15 lines
577 B
JavaScript
const express = require('express');
|
|
const { createClan, deleteClan, getAllClans, getClan, updateClan } = require('../../../controllers/clans.controller');
|
|
const auth = require('../../../middlewares/auth');
|
|
|
|
const clanRouter = express.Router();
|
|
|
|
//clanRouter.param('clanId', getClan);
|
|
clanRouter.get('/', auth.optional, getAllClans);
|
|
clanRouter.post('/', auth.optional, createClan);
|
|
clanRouter.get('/:clanId', auth.required, getClan);
|
|
clanRouter.put('/:clanId', auth.required, updateClan);
|
|
clanRouter.delete('/:clanId', auth.required, deleteClan);
|
|
|
|
module.exports = clanRouter;
|