chore: update var-naming

This commit is contained in:
Steven
2024-04-13 12:11:59 +08:00
parent 49f8cfd5d1
commit 9a2c423435
8 changed files with 14 additions and 14 deletions

View File

@@ -10,7 +10,7 @@ import (
func (d *DB) CreateWebhook(ctx context.Context, create *store.Webhook) (*store.Webhook, error) {
fields := []string{"`name`", "`url`", "`creator_id`"}
placeholder := []string{"?", "?", "?"}
args := []any{create.Name, create.Url, create.CreatorID}
args := []any{create.Name, create.URL, create.CreatorID}
stmt := "INSERT INTO `webhook` (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ")"
result, err := d.db.ExecContext(ctx, stmt, args...)
@@ -55,7 +55,7 @@ func (d *DB) ListWebhooks(ctx context.Context, find *store.FindWebhook) ([]*stor
&rowStatus,
&webhook.CreatorID,
&webhook.Name,
&webhook.Url,
&webhook.URL,
); err != nil {
return nil, err
}