Example #1
0
 def get(self):
     """
     Возвращает все архивные заметки пользователя.
     Используется фильтр - "архивные".
     Требуется аутентификация.
     :return:
     """
     author = g.user
     notes = NoteModel.get_all_notes(author, archive="archive")
     if not notes:
         abort(404, error=f"You have no notes yet")
     return notes, 200
Example #2
0
 def get(self):
     """
     Возвращает все заметки пользователя.
     Фильтры поиска не применяются.
     Требуется аутентификация.
     :return: все заметки
     """
     author = g.user
     notes = NoteModel.get_all_notes(author, archive="all")
     if not notes:
         abort(404, error=f"You have no notes yet")
     return notes, 200
Example #3
0
 def get(self):
     author = g.user
     notes = NoteModel.get_all_notes(author, archive="no_archive")
     if not notes:
         abort(404, error=f"You have no notes yet")
     return notes, 200