19 lines
569 B
TypeScript
19 lines
569 B
TypeScript
import express from 'express';
|
|
import { auth } from '../../middleware/auth';
|
|
import {
|
|
createGalleryImage,
|
|
updateGalleryImage,
|
|
deleteGalleryImage,
|
|
reorderGalleryImages,
|
|
getArticleGallery
|
|
} from './controllers/crud.js';
|
|
|
|
const router = express.Router();
|
|
|
|
router.get('/article/:articleId', getArticleGallery);
|
|
router.post('/article/:articleId', auth, createGalleryImage);
|
|
router.put('/:id', auth, updateGalleryImage);
|
|
router.delete('/:id', auth, deleteGalleryImage);
|
|
router.post('/article/:articleId/reorder', auth, reorderGalleryImages);
|
|
|
|
export default router; |