Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchennn committed Jul 13, 2023
1 parent 96e6f1b commit 0dec72e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 9 additions & 3 deletions backend/WebUI/api_webui.go
Original file line number Diff line number Diff line change
Expand Up @@ -1678,8 +1678,14 @@ func GetUEPDUSessionInfo(c *gin.Context) {

// Create Admin's Tenant & Account
func SetAdmin() {
mongoapi.RestfulAPIDeleteOne("tenantData", bson.M{"tenantName": "admin"})
mongoapi.RestfulAPIDeleteOne("userData", bson.M{"email": "admin"})
err := mongoapi.RestfulAPIDeleteOne("tenantData", bson.M{"tenantName": "admin"})
if err != nil {
logger.InitLog.Errorf("RestfulAPIDeleteOne err: %+v", err)
}
err = mongoapi.RestfulAPIDeleteOne("userData", bson.M{"email": "admin"})
if err != nil {
logger.InitLog.Errorf("RestfulAPIDeleteOne err: %+v", err)
}

// Create Admin tenant
logger.InitLog.Infoln("Create tenant: admin")
Expand All @@ -1689,7 +1695,7 @@ func SetAdmin() {
"tenantName": "admin",
}

_, err := mongoapi.RestfulAPIPutOne("tenantData", bson.M{"tenantName": "admin"}, adminTenantData)
_, err = mongoapi.RestfulAPIPutOne("tenantData", bson.M{"tenantName": "admin"}, adminTenantData)
if err != nil {
logger.InitLog.Errorf("RestfulAPIPutOne err: %+v", err)
}
Expand Down
1 change: 0 additions & 1 deletion backend/webui_service/webui_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,4 @@ func (a *WebuiApp) Start(tlsKeyLogPath string) {
router.NoRoute(ReturnPublic())

logger.InitLog.Infoln(router.Run(":5000"))

}

0 comments on commit 0dec72e

Please sign in to comment.