diff options
author | oliverpool <git@olivier.pfad.fr> | 2024-03-20 17:39:02 +0100 |
---|---|---|
committer | oliverpool <git@olivier.pfad.fr> | 2024-03-23 23:02:06 +0100 |
commit | 33a3ee19553c094ead4c4c5ead2973dee0fc3067 (patch) | |
tree | 2800b6aa383c069066df0bf2430e562a3bcb531d /models/webhook | |
parent | Merge pull request '[port] gitea#29833: Refactor markdown attention render' (... (diff) | |
download | forgejo-33a3ee19553c094ead4c4c5ead2973dee0fc3067.tar.xz forgejo-33a3ee19553c094ead4c4c5ead2973dee0fc3067.zip |
[TESTS] webhook forms creation and edition
Diffstat (limited to 'models/webhook')
-rw-r--r-- | models/webhook/webhook.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/webhook/webhook.go b/models/webhook/webhook.go index 894357e36a..4ab806573b 100644 --- a/models/webhook/webhook.go +++ b/models/webhook/webhook.go @@ -451,6 +451,13 @@ func (opts ListWebhookOptions) ToConds() builder.Cond { return cond } +var _ db.FindOptionsOrder = ListWebhookOptions{} + +// ToOrders implements db.FindOptionsOrder, to sort the webhooks by id asc +func (opts ListWebhookOptions) ToOrders() string { + return "webhook.id" +} + // UpdateWebhook updates information of webhook. func UpdateWebhook(ctx context.Context, w *Webhook) error { _, err := db.GetEngine(ctx).ID(w.ID).AllCols().Update(w) |