Skip to content
Snippets Groups Projects
Commit feeee290 authored by Josh Brooks's avatar Josh Brooks
Browse files

Fix final issues

parent e66b3194
Branches
Tags
No related merge requests found
...@@ -114,7 +114,6 @@ func sessionInitialization() (*id.User, string, *api.Client) { ...@@ -114,7 +114,6 @@ func sessionInitialization() (*id.User, string, *api.Client) {
} }
globals.Log.INFO.Println("Initialized Ram Storage") globals.Log.INFO.Println("Initialized Ram Storage")
register = true register = true
} else { } else {
var sessionA, sessionB string var sessionA, sessionB string
...@@ -430,7 +429,10 @@ var rootCmd = &cobra.Command{ ...@@ -430,7 +429,10 @@ var rootCmd = &cobra.Command{
} }
globals.Log.INFO.Println("Logged In!") globals.Log.INFO.Println("Logged In!")
globals.Log.INFO.Printf("session prior to udb reg: %v", client.GetSession()) globals.Log.INFO.Printf("session prior to udb reg: %v", client.GetSession())
if username != "" && !utils.FileExists(sessionFile) {
// todo: since this is in the root cmd, would checking the regstate directly really be bad?
// It's correct that it should be an error state for RegisterWithUDB, however for this, it's start up code
if username != "" && client.GetSession().GetRegState() == user.PermissioningComplete {
err := client.RegisterWithUDB(username, 2*time.Minute) err := client.RegisterWithUDB(username, 2*time.Minute)
if err != nil { if err != nil {
globals.Log.ERROR.Printf("%+v", err) globals.Log.ERROR.Printf("%+v", err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment