import express from "express";
import {upload} from "../controllers/upload.controller.js";

const router = express.Router();

router.post("/image", upload.single("image"), (req, res) => {
	res.json({
		success: 1,
		file: {
			url: `http://localhost:3000/uploads/blog/${req.file.filename}`,
		},
	});
});

export default router;
