mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Move almost all functions' parameter db.Engine to context.Context (#19748)
* Move almost all functions' parameter db.Engine to context.Context * remove some unnecessary wrap functions
This commit is contained in:
		@@ -35,7 +35,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) {
 | 
			
		||||
 | 
			
		||||
	sys["Title"] = ctx.Tr("admin.systemhooks")
 | 
			
		||||
	sys["Description"] = ctx.Tr("admin.systemhooks.desc")
 | 
			
		||||
	sys["Webhooks"], err = webhook.GetSystemWebhooks(util.OptionalBoolNone)
 | 
			
		||||
	sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, util.OptionalBoolNone)
 | 
			
		||||
	sys["BaseLink"] = setting.AppSubURL + "/admin/hooks"
 | 
			
		||||
	sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks"
 | 
			
		||||
	if err != nil {
 | 
			
		||||
@@ -45,7 +45,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) {
 | 
			
		||||
 | 
			
		||||
	def["Title"] = ctx.Tr("admin.defaulthooks")
 | 
			
		||||
	def["Description"] = ctx.Tr("admin.defaulthooks.desc")
 | 
			
		||||
	def["Webhooks"], err = webhook.GetDefaultWebhooks()
 | 
			
		||||
	def["Webhooks"], err = webhook.GetDefaultWebhooks(ctx)
 | 
			
		||||
	def["BaseLink"] = setting.AppSubURL + "/admin/hooks"
 | 
			
		||||
	def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks"
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user