0
Fork 0
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:
Arno 2024-12-28 16:21:49 +01:00
parent 78c0cadd78
commit 13f406d80b

View file

@ -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'),