Add route to StoresClient and implement updateStatus API method
This commit is contained in:
@@ -45,6 +45,9 @@ export const stores = {
|
||||
update: (id: string, body: Partial<StoreBody>) =>
|
||||
api.put<StoreResponse>(`/stores/${id}`, body).then(r => r.data),
|
||||
|
||||
updateStatus: (id: string, isActive: boolean) =>
|
||||
api.patch<StoreResponse>(`/stores/${id}/status`, { isActive }).then(r => r.data),
|
||||
|
||||
outstandingBalance: (id: string) =>
|
||||
api.get<OutstandingBalanceResponse>(`/stores/${id}/outstanding-balance`).then(r => r.data),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user