const express = require("express");
const router = express.Router();
const { requireAdmin } = require("../middleware/auth.middleware");
const uploadLogo = require("../middleware/uploadLogo");
const {
  getCompanySettings,
  saveCompanySettings
} = require("../controllers/companySettings.controller");

router.get(
  "/admin/company-settings",
  requireAdmin,
  getCompanySettings
);

router.post(
  "/admin/company-settings",
  requireAdmin,
  uploadLogo.single("logo"), // 🔑 MUSS VOR DEM CONTROLLER KOMMEN
  saveCompanySettings
);

module.exports = router;
