Fix jwt-token
This commit is contained in:
@@ -45,7 +45,7 @@ const Devices = () => {
|
|||||||
|
|
||||||
const handleApproveDevice = async (deviceId) => {
|
const handleApproveDevice = async (deviceId) => {
|
||||||
try {
|
try {
|
||||||
await api.post(`/devices/${deviceId}/approve`);
|
await api.post(`/devices/${deviceId}/approve`, { approved: true });
|
||||||
fetchDevices();
|
fetchDevices();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error approving device:', error);
|
console.error('Error approving device:', error);
|
||||||
@@ -55,7 +55,7 @@ const Devices = () => {
|
|||||||
const handleRejectDevice = async (deviceId) => {
|
const handleRejectDevice = async (deviceId) => {
|
||||||
if (window.confirm('Are you sure you want to reject this device?')) {
|
if (window.confirm('Are you sure you want to reject this device?')) {
|
||||||
try {
|
try {
|
||||||
await api.post(`/devices/${deviceId}/reject`);
|
await api.post(`/devices/${deviceId}/approve`, { approved: false });
|
||||||
fetchDevices();
|
fetchDevices();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error rejecting device:', error);
|
console.error('Error rejecting device:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user