From 6588190e8b9e356ef626b61fd2f4b575e6099d65 Mon Sep 17 00:00:00 2001 From: Nikolai Papin Date: Fri, 18 Jul 2025 00:10:52 +0300 Subject: [PATCH] refactor: renamed claims file; chore: removed more unused stuff --- .../internal/dto/{claims.go => userClaims.go} | 0 backend/internal/utils/db.go | 35 ------------------- 2 files changed, 35 deletions(-) rename backend/internal/dto/{claims.go => userClaims.go} (100%) delete mode 100644 backend/internal/utils/db.go diff --git a/backend/internal/dto/claims.go b/backend/internal/dto/userClaims.go similarity index 100% rename from backend/internal/dto/claims.go rename to backend/internal/dto/userClaims.go diff --git a/backend/internal/utils/db.go b/backend/internal/utils/db.go deleted file mode 100644 index 6ebcc09..0000000 --- a/backend/internal/utils/db.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2025 Nikolai Papin -// -// This file is part of Easywish -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -// the GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package utils - -import ( - "context" - "easywish/config" - - "github.com/jackc/pgx/v5" -) - -func GetDbConn() (*pgx.Conn, context.Context, error) { - ctx := context.Background() - conn, err := pgx.Connect(ctx, config.GetConfig().DatabaseUrl) - if err != nil { - return nil, nil, err - } - - return conn, ctx, nil -}