"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.authorizeUserFetch = exports.authorizeDelete = exports.authorizeUpdate = exports.authorizeAdd = exports.authorizeFetch = void 0;
const api_agent_1 = __importDefault(require("@/utils/api-agent"));
const authorizeFetch = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/authorizes', params, (rs) => {
        resolve(rs);
    });
});
exports.authorizeFetch = authorizeFetch;
const authorizeAdd = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/authorizes', params, (rs) => {
        resolve(rs);
    });
});
exports.authorizeAdd = authorizeAdd;
const authorizeUpdate = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/authorizes', params, (rs) => {
        resolve(rs);
    });
});
exports.authorizeUpdate = authorizeUpdate;
const authorizeDelete = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/authorizes/status', params, (rs) => {
        resolve(rs);
    });
});
exports.authorizeDelete = authorizeDelete;
const authorizeUserFetch = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/user-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.authorizeUserFetch = authorizeUserFetch;
