Fix jwt-token

This commit is contained in:
2025-08-28 07:34:59 +02:00
parent fa109f85e3
commit 4d41ccbd96

View File

@@ -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);