fix(mobile users): corrected and endpoint that prevented us from change the pin number
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
import { useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
||||||
import { createFileRoute, redirect } from "@tanstack/react-router";
|
import { createFileRoute, redirect } from "@tanstack/react-router";
|
||||||
import { createColumnHelper } from "@tanstack/react-table";
|
import { createColumnHelper } from "@tanstack/react-table";
|
||||||
import axios from "axios";
|
|
||||||
import { format } from "date-fns-tz";
|
import { format } from "date-fns-tz";
|
||||||
import { Trash } from "lucide-react";
|
import { Trash } from "lucide-react";
|
||||||
import { Suspense, useState } from "react";
|
import { Suspense, useState } from "react";
|
||||||
@@ -56,7 +55,7 @@ const updateSettings = async (
|
|||||||
) => {
|
) => {
|
||||||
//console.log(id, data);
|
//console.log(id, data);
|
||||||
try {
|
try {
|
||||||
const res = await axios.patch(`/mobile/auth/user/${id}`, data, {
|
const res = await api.patch(`/mobile/auth/user/${id}`, data, {
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
timeout: 15000,
|
timeout: 15000,
|
||||||
validateStatus: () => true,
|
validateStatus: () => true,
|
||||||
@@ -121,7 +120,7 @@ const ScanUserTable = () => {
|
|||||||
<EditableCellInput
|
<EditableCellInput
|
||||||
value={getValue()}
|
value={getValue()}
|
||||||
id={row.original.id}
|
id={row.original.id}
|
||||||
field="value"
|
field="pinNumber"
|
||||||
onSubmit={({ id, field, value }) => {
|
onSubmit={({ id, field, value }) => {
|
||||||
updateSetting.mutate({ id, field, value });
|
updateSetting.mutate({ id, field, value });
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user