fix: id in payload
This commit is contained in:
@@ -106,8 +106,10 @@ export const useAppVersionStore = create<AppVersionStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'app',
|
||||
key: 'delete',
|
||||
id,
|
||||
deleteFile,
|
||||
payload: {
|
||||
id,
|
||||
deleteFile,
|
||||
},
|
||||
});
|
||||
if (res.code === 200) {
|
||||
getList();
|
||||
|
||||
@@ -67,8 +67,10 @@ export const useUserAppStore = create<UserAppStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'user-app',
|
||||
key: 'delete',
|
||||
id,
|
||||
deleteFile,
|
||||
payload: {
|
||||
id,
|
||||
deleteFile,
|
||||
},
|
||||
});
|
||||
if (res.code === 200) {
|
||||
getList();
|
||||
|
||||
@@ -141,7 +141,9 @@ export const PreviewWrapper = () => {
|
||||
const res = await query.post<any, any>({
|
||||
path: 'container',
|
||||
key: 'get',
|
||||
id,
|
||||
payload: {
|
||||
id,
|
||||
}
|
||||
});
|
||||
if (res.code === 200) {
|
||||
const data = res.data;
|
||||
|
||||
@@ -81,7 +81,9 @@ export const useContainerStore = create<ContainerStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'container',
|
||||
key: 'delete',
|
||||
id,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
if (res.code === 200) {
|
||||
getList();
|
||||
@@ -97,7 +99,9 @@ export const useContainerStore = create<ContainerStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'container',
|
||||
key: 'get',
|
||||
id,
|
||||
payload: {
|
||||
id,
|
||||
}
|
||||
});
|
||||
set({ loading: false });
|
||||
if (res.code === 200) {
|
||||
|
||||
@@ -70,7 +70,9 @@ export const useFileStore = create<FileStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'file',
|
||||
key: 'delete',
|
||||
id,
|
||||
payload: {
|
||||
id,
|
||||
}
|
||||
});
|
||||
if (res.code === 200) {
|
||||
getList();
|
||||
|
||||
@@ -72,7 +72,9 @@ export const useOrgStore = create<OrgStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'org',
|
||||
key: 'delete',
|
||||
id,
|
||||
payload: {
|
||||
id,
|
||||
}
|
||||
});
|
||||
if (res.code === 200) {
|
||||
getList();
|
||||
@@ -91,7 +93,9 @@ export const useOrgStore = create<OrgStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'org',
|
||||
key: 'get',
|
||||
id: orgId,
|
||||
payload: {
|
||||
id: orgId,
|
||||
}
|
||||
});
|
||||
if (res.code === 200) {
|
||||
const { org, users } = res.data || {};
|
||||
|
||||
@@ -81,7 +81,9 @@ export const useUserStore = create<UserStore>((set, get) => {
|
||||
const res = await query.post({
|
||||
path: 'user',
|
||||
key: 'delete',
|
||||
id,
|
||||
payload: {
|
||||
id,
|
||||
}
|
||||
});
|
||||
if (res.code === 200) {
|
||||
getList();
|
||||
|
||||
@@ -101,10 +101,10 @@ export class QueryMarkBase<T extends SimpleObject = SimpleObject> {
|
||||
}
|
||||
|
||||
async getMark(id: string, opts?: DataOpts) {
|
||||
return this.post<Result<Mark>>({ key: 'get', id }, opts);
|
||||
return this.post<Result<Mark>>({ key: 'get', payload: { id } }, opts);
|
||||
}
|
||||
async getVersion(id: string, opts?: DataOpts) {
|
||||
return this.post<Result<{ version: number; id: string }>>({ key: 'getVersion', id }, opts);
|
||||
return this.post<Result<{ version: number; id: string }>>({ key: 'getVersion', payload: { id } }, opts);
|
||||
}
|
||||
/**
|
||||
* 检查版本
|
||||
@@ -133,7 +133,7 @@ export class QueryMarkBase<T extends SimpleObject = SimpleObject> {
|
||||
}
|
||||
|
||||
async deleteMark(id: string, opts?: DataOpts) {
|
||||
return this.post<Result<Mark>>({ key: 'delete', id }, opts);
|
||||
return this.post<Result<Mark>>({ key: 'delete', payload: { id } }, opts);
|
||||
}
|
||||
}
|
||||
export class QueryMark extends QueryMarkBase<SimpleObject> {
|
||||
|
||||
Submodule submodules/query-mark updated: f12e6896a9...ba931f1901
Submodule submodules/wallnote updated: 3eaf262ee8...2245857128
Reference in New Issue
Block a user