{"size": 469, "ext": "js", "max_stars_repo_path": "src/Routes/gif.js", "max_stars_repo_name": "ushnuel/Teamwork", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Routes/gif.js", "max_issues_repo_name": "ushnuel/Teamwork", "max_issues_repo_issues_event_min_datetime": "2019-10-31T08:19:27.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-02T01:28:22.000Z", "max_forks_repo_path": "src/Routes/gif.js", "max_forks_repo_name": "ushnuel/Teamwork", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 29, "max_forks_count": null, "avg_line_length": 31.2666666667, "max_line_length": 74, "alphanum_fraction": 0.7356076759}
import { Router } from 'express';
import multer from 'multer';
import GifController from '../Controllers/gif';
import { cloudinary } from '../Middlewares';

const router = Router();
const storage = multer.memoryStorage();
const uploadImage = multer({ storage }).single('image');

router.post('/', uploadImage, cloudinary.upload, GifController.createGif);
router.delete('/:gifId', GifController.delete);
router.get('/:gifId', GifController.get);

export default router;
