mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
feat(server): refactored for better readability
This commit is contained in:
parent
78c0cadd78
commit
13f406d80b
1 changed files with 2 additions and 6 deletions
|
@ -230,12 +230,8 @@
|
|||
personUpdateDto: { isFavorite: !detail.isFavorite },
|
||||
});
|
||||
|
||||
people = people.map((person: PersonResponseDto) => {
|
||||
if (person.id === updatedPerson.id) {
|
||||
return updatedPerson;
|
||||
}
|
||||
return person;
|
||||
});
|
||||
const index = people.findIndex((person) => person.id === detail.id);
|
||||
people[index] = updatedPerson;
|
||||
|
||||
notificationController.show({
|
||||
message: updatedPerson.isFavorite ? $t('added_to_favorites') : $t('removed_from_favorites'),
|
||||
|
|
Loading…
Add table
Reference in a new issue