From 4d41ccbd96c1ee432039051b11621852addec1fd Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Thu, 28 Aug 2025 07:34:59 +0200 Subject: [PATCH] Fix jwt-token --- client/src/pages/Devices.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/Devices.jsx b/client/src/pages/Devices.jsx index ae0d1ff..9068ac1 100644 --- a/client/src/pages/Devices.jsx +++ b/client/src/pages/Devices.jsx @@ -45,7 +45,7 @@ const Devices = () => { const handleApproveDevice = async (deviceId) => { try { - await api.post(`/devices/${deviceId}/approve`); + await api.post(`/devices/${deviceId}/approve`, { approved: true }); fetchDevices(); } catch (error) { console.error('Error approving device:', error); @@ -55,7 +55,7 @@ const Devices = () => { const handleRejectDevice = async (deviceId) => { if (window.confirm('Are you sure you want to reject this device?')) { try { - await api.post(`/devices/${deviceId}/reject`); + await api.post(`/devices/${deviceId}/approve`, { approved: false }); fetchDevices(); } catch (error) { console.error('Error rejecting device:', error);