fix: refs for db provider and few utils

This commit is contained in:
Lakhan Samani
2023-07-31 16:42:11 +05:30
parent 146561bacb
commit 15a4be5431
82 changed files with 394 additions and 533 deletions

View File

@@ -24,7 +24,7 @@ func deleteWebhookTest(t *testing.T, s TestSetup) {
req.Header.Set("Cookie", fmt.Sprintf("%s=%s", constants.AdminCookieName, h))
// get all webhooks
webhooks, err := db.Provider.ListWebhook(ctx, model.Pagination{
webhooks, err := db.Provider.ListWebhook(ctx, &model.Pagination{
Limit: 20,
Page: 1,
Offset: 0,
@@ -41,14 +41,14 @@ func deleteWebhookTest(t *testing.T, s TestSetup) {
assert.NotEmpty(t, res.Message)
}
webhooks, err = db.Provider.ListWebhook(ctx, model.Pagination{
webhooks, err = db.Provider.ListWebhook(ctx, &model.Pagination{
Limit: 20,
Page: 1,
Offset: 0,
})
assert.NoError(t, err)
assert.Len(t, webhooks.Webhooks, 0)
webhookLogs, err := db.Provider.ListWebhookLogs(ctx, model.Pagination{
webhookLogs, err := db.Provider.ListWebhookLogs(ctx, &model.Pagination{
Limit: 100,
Page: 1,
Offset: 0,