We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7169a0a commit be93d06Copy full SHA for be93d06
1 file changed
modal_backend/routes/notes.py
@@ -29,12 +29,26 @@
29
30
31
@note.get("", response_model=list[NoteGet])
32
-async def get_notes(type_id: int = Query(None), user=Depends(UnionAuth())) -> list[NoteGet]:
+async def get_notes(
33
+ limit: int = 10,
34
+ offset: int = 0,
35
+ type_id: int = Query(None),
36
+ groups_id: list[int] = Query(None),
37
+ services_id: list[int] = Query(None),
38
+ status: str = Query(
39
+ enum=["active", "archived"],
40
+ default=None,
41
+ ),
42
+ asc_order: bool = False,
43
+ user=Depends(UnionAuth()),
44
+) -> list[NoteGet]:
45
"""
46
Получить список модалок по type_id.
47
48
В случае несуществующего type_id ошибка ObjectNotFound
49
50
+
51
+ # add filter logic
52
notes = await NoteService.get_note_by_type_id(db, type_id)
53
return [NoteGet.model_validate(note) for note in notes]
54
0 commit comments