/** * @description 更新文件(目录) */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** projectId */ projectId: number; /** fileId */ fileId: string; /** lock */ lock: number; } export const init = undefined; export async function request(params = {}, bodyParams = {}) { return Request({ url: '/api/file/{fileId}', params: bodyParams, method: 'put', }); } export function createFetchAction(types, stateKey) { return (params = {}, bodyParams, meta?: any) => { return { types, meta, stateKey, method: 'PUT', url: getUrl('/api/file/{fileId}', params, 'PUT'), params: bodyParams, init, }; }; }