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({
|
const res = await query.post({
|
||||||
path: 'app',
|
path: 'app',
|
||||||
key: 'delete',
|
key: 'delete',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
deleteFile,
|
deleteFile,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
@@ -67,8 +67,10 @@ export const useUserAppStore = create<UserAppStore>((set, get) => {
|
|||||||
const res = await query.post({
|
const res = await query.post({
|
||||||
path: 'user-app',
|
path: 'user-app',
|
||||||
key: 'delete',
|
key: 'delete',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
deleteFile,
|
deleteFile,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
@@ -141,7 +141,9 @@ export const PreviewWrapper = () => {
|
|||||||
const res = await query.post<any, any>({
|
const res = await query.post<any, any>({
|
||||||
path: 'container',
|
path: 'container',
|
||||||
key: 'get',
|
key: 'get',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ export const useContainerStore = create<ContainerStore>((set, get) => {
|
|||||||
const res = await query.post({
|
const res = await query.post({
|
||||||
path: 'container',
|
path: 'container',
|
||||||
key: 'delete',
|
key: 'delete',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
getList();
|
getList();
|
||||||
@@ -97,7 +99,9 @@ export const useContainerStore = create<ContainerStore>((set, get) => {
|
|||||||
const res = await query.post({
|
const res = await query.post({
|
||||||
path: 'container',
|
path: 'container',
|
||||||
key: 'get',
|
key: 'get',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
set({ loading: false });
|
set({ loading: false });
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|||||||
@@ -70,7 +70,9 @@ export const useFileStore = create<FileStore>((set, get) => {
|
|||||||
const res = await query.post({
|
const res = await query.post({
|
||||||
path: 'file',
|
path: 'file',
|
||||||
key: 'delete',
|
key: 'delete',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
@@ -72,7 +72,9 @@ export const useOrgStore = create<OrgStore>((set, get) => {
|
|||||||
const res = await query.post({
|
const res = await query.post({
|
||||||
path: 'org',
|
path: 'org',
|
||||||
key: 'delete',
|
key: 'delete',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
getList();
|
getList();
|
||||||
@@ -91,7 +93,9 @@ export const useOrgStore = create<OrgStore>((set, get) => {
|
|||||||
const res = await query.post({
|
const res = await query.post({
|
||||||
path: 'org',
|
path: 'org',
|
||||||
key: 'get',
|
key: 'get',
|
||||||
|
payload: {
|
||||||
id: orgId,
|
id: orgId,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const { org, users } = res.data || {};
|
const { org, users } = res.data || {};
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ export const useUserStore = create<UserStore>((set, get) => {
|
|||||||
const res = await query.post({
|
const res = await query.post({
|
||||||
path: 'user',
|
path: 'user',
|
||||||
key: 'delete',
|
key: 'delete',
|
||||||
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ export class QueryMarkBase<T extends SimpleObject = SimpleObject> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getMark(id: string, opts?: DataOpts) {
|
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) {
|
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) {
|
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> {
|
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