Commit Graph

5 Commits (23fbf5e1eef8985d8223e5c34e92e8bd2c97bac4)

Author SHA1 Message Date
Lunny Xiao fd7d83ace6
Move almost all functions' parameter db.Engine to context.Context ()
* Move almost all functions' parameter db.Engine to context.Context
* remove some unnecessary wrap functions
zeripath d6fa138e7c
Only send webhook events to active system webhooks and only deliver to active hooks ()
There is a bug in the system webhooks whereby the active state is not checked when
webhooks are prepared and there is a bug that deactivating webhooks do not prevent
queued deliveries.

* Only add SystemWebhooks to the prepareWebhooks list if they are active
* At the time of delivery if the underlying webhook is not active mark it
as "delivered" but with a failed delivery so it does not get delivered.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Lunny Xiao 33fca2b537
Move webhook into models/webhook/ ()
Lunny Xiao 33e0b38287
Rename context.Query to context.Form ()
Lunny Xiao 1bfb0a24d8
Refactor routers directory ()
* refactor routers directory

* move func used for web and api to common

* make corsHandler a function to prohibit side efects

* rm unused func

Co-authored-by: 6543 <6543@obermui.de>