Exemplo n.º 1
0
 def get(self):
     """
     Return last 100 user notifications.
     ---
     tags:
     - User
     parameters:
       - in: body
         name: Date
         schema:
             type: object
             properties:
                 after:
                     type: timestamp
                     example: 2022-07-12
                 before:
                     type: timestamp
                     example: 2022-07-12
     responses:
         201:
             description: Last 100 user notifications
     """
     (after, before) = self.get_arguments()
     notifications = user_service.get_last_notifications(after=after,
                                                         before=before)
     user_service.mark_notifications_as_read()
     return notifications
Exemplo n.º 2
0
 def get(self):
     (after, before) = self.get_arguments()
     notifications = user_service.get_last_notifications(
         after=after, before=before
     )
     user_service.mark_notifications_as_read()
     return notifications
Exemplo n.º 3
0
 def get(self):
     notifications = user_service.get_last_notifications()
     user_service.mark_notifications_as_read()
     return notifications