const express = require("express");
const router = express.Router();

const {
  delete_file,
  fileUploadResized,
  fileUploadResizedAvatar,
  delete_avatar,
} = require("../controllers/fileController");
const { imageUploader } = require("../middlewares/multerConfigResized");

// Upload files resized
router.post("/upload/images", fileUploadResized);
router.post("/upload/avatar", fileUploadResizedAvatar);

// delete files
router.post("/delete", delete_file);
router.post("/delete/avatar", delete_avatar);

module.exports = router;
