Skip to content

Commit 1335efb

Browse files
author
Lasim
committed
fix(backend): change device removal to hard delete from database
1 parent b476825 commit 1335efb

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

services/backend/src/services/deviceService.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,11 @@ export class DeviceService {
274274
}
275275

276276
/**
277-
* Remove device (soft delete by marking inactive)
277+
* Remove device (hard delete)
278278
*/
279279
async removeDevice(deviceId: string, userId: string): Promise<void> {
280-
const now = new Date();
281-
282280
const result = await this.db
283-
.update(devices)
284-
.set({
285-
is_active: false,
286-
updated_at: now,
287-
})
281+
.delete(devices)
288282
.where(and(
289283
eq(devices.id, deviceId),
290284
eq(devices.user_id, userId)

0 commit comments

Comments
 (0)