diff --git a/api/admin.go b/api/admin.go index 4d41164..2316192 100644 --- a/api/admin.go +++ b/api/admin.go @@ -31,17 +31,6 @@ func HandleCreateIdentityFlow(c *gin.Context) { return } - if err != nil { - log.ErrorLogger("Unable to convert JSON to map", err) - - errCode, _ := strconv.Atoi(strings.Split(err.Error(), " ")[0]) - c.JSON(errCode, gin.H{ - "error": err.Error(), - "message": "Unable to convert JSON to map", - }) - return - } - createdIdentity, r, err := admin.CreateIdentityFlowWrapper(t) if err != nil { diff --git a/api/main.go b/api/main.go index b788394..efc3ae6 100644 --- a/api/main.go +++ b/api/main.go @@ -36,13 +36,13 @@ func Start() { r.GET("/mfa", HandleGetMFAFlow) r.POST("/mfa", HandlePostMFAFlow) - // r.POST("/create-identity", middleware.OnlyAdmin, HandleCreateIdentityFlow) - // r.GET("/get-identity", middleware.OnlyAdmin, HandleGetIdentityFlow) - // r.POST("/delete-identity", middleware.OnlyAdmin, HandleDeleteIdentityFlow) - // r.GET("/list-identity", middleware.OnlyAdmin, HandleListIdentity) - // r.PUT("/update-identity/ban", middleware.OnlyAdmin, HandleBanIdentity) - // r.PUT("/update-identity/remove-ban", middleware.OnlyAdmin, HandleRemoveBanIdentity) - // r.PUT("/update-identity/switch-roles", middleware.OnlyAdmin, HandleRoleSwitch) + r.POST("/create-identity", middleware.OnlyAdmin, HandleCreateIdentityFlow) + r.GET("/get-identity", middleware.OnlyAdmin, HandleGetIdentityFlow) + r.POST("/delete-identity", middleware.OnlyAdmin, HandleDeleteIdentityFlow) + r.GET("/list-identity", middleware.OnlyAdmin, HandleListIdentity) + r.PUT("/update-identity/ban", middleware.OnlyAdmin, HandleBanIdentity) + r.PUT("/update-identity/remove-ban", middleware.OnlyAdmin, HandleRemoveBanIdentity) + r.PUT("/update-identity/switch-roles", middleware.OnlyAdmin, HandleRoleSwitch) r.GET("/register", HandleGetRegistrationFlow) r.POST("/register", HandlePostRegistrationFlow)