mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
Merge pull request #115 from SyncrowIOT/SP-700-error-message-on-device-factory-reset-process
finished soft delete devices
This commit is contained in:
@ -85,6 +85,7 @@ export class DeviceStatusFirebaseService {
|
||||
return await this.deviceRepository.findOne({
|
||||
where: {
|
||||
deviceTuyaUuid,
|
||||
isActive: true,
|
||||
},
|
||||
relations: ['productDevice'],
|
||||
});
|
||||
@ -139,6 +140,7 @@ export class DeviceStatusFirebaseService {
|
||||
return await this.deviceRepository.findOne({
|
||||
where: {
|
||||
uuid: deviceUuid,
|
||||
isActive: true,
|
||||
},
|
||||
...(withProductDevice && { relations: ['productDevice'] }),
|
||||
});
|
||||
|
@ -18,8 +18,9 @@ export class DeviceEntity extends AbstractEntity<DeviceDto> {
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: true,
|
||||
type: 'boolean',
|
||||
})
|
||||
isActive: true;
|
||||
isActive: boolean;
|
||||
|
||||
@ManyToOne(() => UserEntity, (user) => user.userSpaces, { nullable: false })
|
||||
user: UserEntity;
|
||||
|
Reference in New Issue
Block a user