feat: Mark people as favorite (#14866)

* feat: added ability to mark people as favorite, which get sorted to the front of the people list

* feat(server): added unit test for favorite people

* feat(server): refactored for better readability

* fixed person service unit tests

* fixed open-api and sql checks

* fixed bad codegen and removed unnecessary type assertion again

* chore: clean up

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Arno
2025-02-04 09:52:17 +01:00
committed by GitHub
parent 69e88ef985
commit 7ec3610753
20 changed files with 355 additions and 28 deletions

View File

@@ -132,6 +132,7 @@ export class PersonRepository implements IPersonRepository {
)
.where('person.ownerId', '=', userId)
.orderBy('person.isHidden', 'asc')
.orderBy('person.isFavorite', 'desc')
.having((eb) =>
eb.or([
eb('person.name', '!=', ''),