From 28696c6e392e61fc7fdbad7599a0cc999b788ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20P=C3=A9rez?= Date: Fri, 13 Dec 2024 01:08:01 +0100 Subject: [PATCH] add keys --- app/app.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/app.go b/app/app.go index 6e54d3b..698635c 100644 --- a/app/app.go +++ b/app/app.go @@ -41,10 +41,13 @@ const ( NotImplemented string = "not_implemented" // User keys - UserUsernameKey string = "user_username_key" - UserEmailKey string = "user_email_key" + UserUsernameKey string = "username_key" + UserEmailKey string = "email_key" UsernameAlReadyExists string = "username_already_exists" + UserSessionKey string = "user_session_key" 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" @@ -64,6 +67,7 @@ type AppDatabase struct { } type AppInfo struct { + Name string Version string } @@ -73,7 +77,7 @@ type AppSecurity struct { Duration time.Duration } -func New(version string) *App { +func New(name, version string) *App { var err error err = loadEnvFile()