feat: cancel request
This commit is contained in:
parent
3eda26bbf7
commit
142cbbbba3
1 changed files with 10 additions and 0 deletions
|
|
@ -260,6 +260,14 @@ export const useRequestList = defineStore('request-list', () => {
|
|||
return null;
|
||||
}
|
||||
|
||||
async function cancelRequest(id: string) {
|
||||
const res = await api.post(`/request-data/${id}/cancel`);
|
||||
|
||||
if (res.status < 400) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return {
|
||||
data,
|
||||
page,
|
||||
|
|
@ -278,5 +286,7 @@ export const useRequestList = defineStore('request-list', () => {
|
|||
|
||||
editRequestWork,
|
||||
editStatusRequestWork,
|
||||
|
||||
cancelRequest,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue