refactor: restructure API routes from v1/v2/v3 to domain-based (skydive/cms/herowars)

This commit is contained in:
2026-04-24 00:47:58 +02:00
parent b99842f458
commit 9f73ed07ba
36 changed files with 2416 additions and 50 deletions
+14
View File
@@ -0,0 +1,14 @@
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;