diff --git a/app/app.go b/app/app.go index 9cbfc52..ae7f0ff 100644 --- a/app/app.go +++ b/app/app.go @@ -47,8 +47,9 @@ const ( InvalidEntityID string = "invalid_entity_id" NotImplemented string = "not_implemented" NotPassValidation string = "not_pass_validation" + NotEnoughBalance string = "not_enough_balance" - // User keys + // User keys (DB) UserUsernameKey string = "username_key" UserEmailKey string = "email_key" UsernameAlreadyExists string = "username_already_exists" @@ -56,9 +57,12 @@ const ( EmailAlreadyExists string = "email_already_exists" PhoneNumberKey string = "phone_number_key" PhoneAlreadyExists string = "phone_already_exists" - IncorrectPassword string = "incorrect_password" - ErrorGeneratingToken string = "error_generating_token" - LoggedIn string = "logged_in" + + // Auth + TokenPayload string = "token_payload" + LoggedIn string = "logged_in" + IncorrectPassword string = "incorrect_password" + ErrorGeneratingToken string = "error_generating_token" ) var ( diff --git a/db/pgx.go b/db/pgx.go index f10ad5d..e1a466e 100644 --- a/db/pgx.go +++ b/db/pgx.go @@ -2,11 +2,12 @@ package db import ( "context" + "log/slog" + _ "github.com/jackc/pgconn" _ "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" _ "github.com/jackc/pgx/v5/stdlib" - "log/slog" ) func NewPGXPool(dataSource string) *pgxpool.Pool {