mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
feat: create setExpensePaidOff method
This commit is contained in:
@@ -572,6 +572,25 @@ export class ExpenseApiService extends BaseApiService<
|
||||
}
|
||||
}
|
||||
|
||||
async setExpensePaidOff(id: number) {
|
||||
try {
|
||||
const res = await httpClient<BaseApiResponse<Expense>>(
|
||||
`${this.basePath}/${id}/pay`,
|
||||
{
|
||||
method: 'PATCH',
|
||||
}
|
||||
);
|
||||
|
||||
return res;
|
||||
} catch (error) {
|
||||
if (axios.isAxiosError<BaseApiResponse<Expense>>(error)) {
|
||||
return error.response?.data;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
async deleteExpenseRequestDocument(
|
||||
expenseId: number,
|
||||
documentId: number
|
||||
|
||||
Reference in New Issue
Block a user