Cleanup
Some checks are pending
check / check (push) Waiting to run

This commit is contained in:
KS Jannette
2026-02-28 20:42:57 -05:00
parent 90a338d46c
commit 7357315810
11 changed files with 69 additions and 27 deletions

View File

@@ -2,7 +2,9 @@ package models
import (
"context"
"errors"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/kjannette/koin-ping/backend-go/internal/domain"
)
@@ -26,7 +28,7 @@ func (m *NotificationConfigModel) GetConfig(ctx context.Context, userID string)
).Scan(&c.UserID, &c.DiscordWebhookURL, &c.TelegramChatID, &c.TelegramBotToken,
&c.Email, &c.NotificationEnabled, &c.CreatedAt, &c.UpdatedAt)
if err != nil {
if err.Error() == "no rows in result set" {
if errors.Is(err, pgx.ErrNoRows) {
return nil, nil
}
return nil, err