feat/add arangodb support (#80)

*feat: add arangodb init

* fix: dao for sql + arangodb

* fix: update error logs

* fix: use db name dynamically
This commit is contained in:
Lakhan Samani
2021-12-17 21:25:07 +05:30
committed by GitHub
parent 85b09dceb7
commit 75cf8472cf
33 changed files with 640 additions and 266 deletions

View File

@@ -43,7 +43,7 @@ func Login(ctx context.Context, params model.LoginInput) (*model.AuthResponse, e
err = bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(params.Password))
if err != nil {
log.Println("Compare password error:", err)
log.Println("compare password error:", err)
return res, fmt.Errorf(`invalid password`)
}
roles := constants.DEFAULT_ROLES
@@ -68,7 +68,7 @@ func Login(ctx context.Context, params model.LoginInput) (*model.AuthResponse, e
IP: utils.GetIP(gc.Request),
}
db.Mgr.SaveSession(sessionData)
db.Mgr.AddSession(sessionData)
}()
res = &model.AuthResponse{