mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
refactor(nestjs): wip
This commit is contained in:
@@ -21,15 +21,15 @@ export function useCreateCurrency(props) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Edits the given currency code.
|
||||
* Edits the given currency by ID.
|
||||
*/
|
||||
export function useEditCurrency(props) {
|
||||
const queryClient = useQueryClient();
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation(
|
||||
([currencyCode, values]) =>
|
||||
apiRequest.post(`currencies/${currencyCode}`, values),
|
||||
([currencyId, values]) =>
|
||||
apiRequest.put(`currencies/${currencyId}`, values),
|
||||
{
|
||||
onSuccess: () => {
|
||||
// Invalidate currencies.
|
||||
|
||||
Reference in New Issue
Block a user