Skip to content

Commit

Permalink
change made on requirement update
Browse files Browse the repository at this point in the history
  • Loading branch information
Kannan112 committed Dec 21, 2023
1 parent 085049b commit 2561660
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 20 deletions.
35 changes: 21 additions & 14 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
##sample .env
# postgresSQL DataBase
PORT="*******"
DB_HOST="********"
DB_NAME="********"
DB_USER="(********)"
DB_PORT="****"
DB_PASSWORD="******"

DB_HOST="LOCALHOST**"
DB_NAME="DB_NAME**"
DB_USER="DB_USER**"
DB_PORT="PORT**" /// ->5432
DB_PASSWORD="password"
# google-Auth
GOAUTH_CLIENTID="************************"
GOAUTH_CLIENR_SRC="***************"
REDIRECT_URL="***********"

TWILIO_ACCOUNT_SID = "TWILIO_ACCOUNT_SID"
TWILIO_AUTHTOKEN = "TWILIO_AUTHTOKEN"
TWILIO_SERVICES_ID = "TWILIO_SERVICES_ID"
# secret-key
ACCESS_TOKEN="*********"
REFRESH_TOKEN="**********"

ACCESS_TOKEN="Access-Token-src"
REFRESH_TOKEN="Refresh-Token-src"
# razorpay
RZOR_KEYID="******************"
RAZOR_KEYSCR="***************"

RZOR_KEYID="RAZOR_KEYID"

RAZOR_KEYSCR="RAZOR_KEYSCR"
# twilio
TWILIO_ACCOUNT_SID = "************"
TWILIO_AUTHTOKEN = "***********"
TWILIO_SERVICES_ID = "************"
1 change: 0 additions & 1 deletion backend-kubernetes.yml
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Binary file modified cmd/api/tmp/api.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions pkg/common/res/adminRes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
)

type AdminData struct {
Id int
Name string
Email string
Id int
UserName string
Email string
}
type AdminDashboard struct {
TotalUsers int
Expand Down
5 changes: 4 additions & 1 deletion pkg/repository/adminRepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ func (a *AdminDatabase) CreateAdmin(admin req.CreateAdmin) (res.AdminData, error
// if err := a.DB.Create(&admin).Error; err != nil {
// return adminData, errors.New("failed to save admin")
// }
addQuery := `INSERT INTO admins (user_name,email,password) VALUES($1,$2,$3)`
addQuery := `INSERT INTO admins (user_name, email, password)
VALUES ($1, $2, $3)
RETURNING id, user_name, email;
`
err := a.DB.Raw(addQuery, admin.Name, admin.Email, admin.Password).Scan(&adminData).Error
return adminData, err
}
Expand Down
2 changes: 1 addition & 1 deletion tmp/build-errors.log

Large diffs are not rendered by default.

0 comments on commit 2561660

Please sign in to comment.