import { UploadController } from "@/controllers/UploadController";
import { createRequest } from "@/utils/request";
const token = localStorage.getItem("token");
export const request = createRequest({
  baseURL: "https://www.infish.cn/adhuaxi/v1",
  interceptors: {
    request(req: any) {
      if (!req.headers) req.headers = {};
      req.headers["authorization"] = `Bearer ${token}`;
      return req;
    },
    response: (res: any) => {},
  },
});
export const uploader = new UploadController(request);
