mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 18:56:22 +00:00
Fix password filtering in DoorLockService
This commit is contained in:
@ -136,7 +136,7 @@ export class DoorLockService {
|
||||
const passwordFiltered = passwords.result.filter(
|
||||
(item) =>
|
||||
(!item.schedule_list || item.schedule_list.length === 0) &&
|
||||
item.type === 1,
|
||||
item.type === 0, //temp solution
|
||||
);
|
||||
|
||||
return convertKeysToCamelCase(passwordFiltered);
|
||||
@ -168,7 +168,7 @@ export class DoorLockService {
|
||||
|
||||
if (passwords.result.length > 0) {
|
||||
const passwordFiltered = passwords.result
|
||||
.filter((item) => item.type === 1)
|
||||
.filter((item) => item.type === 0) //temp solution
|
||||
.map((password: any) => {
|
||||
if (password.schedule_list?.length > 0) {
|
||||
password.schedule_list = password.schedule_list.map(
|
||||
@ -456,7 +456,8 @@ export class DoorLockService {
|
||||
...(isOnline && {
|
||||
schedule_list: scheduleList,
|
||||
}),
|
||||
type: type === 'multiple' ? '0' : '1',
|
||||
|
||||
type: '0', //temporary solution,
|
||||
},
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user