Files
web2.0-backend/webapp/webhook.py
T
2022-01-13 00:05:02 +02:00

10 lines
265 B
Python

from webapp.models import BaseWebhook
import logging
def processHooks(message: str, eventType: str):
allHooks = BaseWebhook.objects.all()
for hook in list(allHooks):
logging.debug(hook)
if (hook.plugs[eventType] == True):
hook.broadcast(message)