feat(dashboard): cancel return request (#8761)

* wip: cancel return request

* fix: refactor

* feat: correct endpoint, add hook, fix types

* feat: add prompt
This commit is contained in:
Frane Polić
2024-08-27 13:57:12 +02:00
committed by GitHub
parent c11ef01c15
commit 9197bdd77b
5 changed files with 110 additions and 11 deletions

View File

@@ -45,6 +45,21 @@ export class Return {
)
}
async cancel(
id: string,
query?: HttpTypes.SelectParams,
headers?: ClientHeaders
) {
return await this.client.fetch<HttpTypes.AdminReturnResponse>(
`/admin/returns/${id}/cancel`,
{
method: "POST",
headers,
query,
}
)
}
async cancelRequest(
id: string,
query?: HttpTypes.SelectParams,