Beispiel #1
0
    def _send_notification(self, updated_vocabulary):
        """
        Sends notification about the updated vocabulary to all the connected clients.
        """

        user = get_user_from_request()
        push_notification('vocabularies:updated', vocabulary=updated_vocabulary.get('display_name'),
                          user=str(user[config.ID_FIELD]) if user else None)
Beispiel #2
0
    def _send_notification(self, updated_vocabulary, event="vocabularies:updated"):
        """
        Sends notification about the updated vocabulary to all the connected clients.
        """

        user = get_user_from_request()
        push_notification(
            event,
            vocabulary=updated_vocabulary.get("display_name"),
            user=str(user[config.ID_FIELD]) if user else None,
            vocabulary_id=updated_vocabulary["_id"],
        )