feat: creation of service account (#44913)

* feat: creation of service account

* added back button for the details page

* refactor: remove unused file, renamed fields

* oppps
This commit is contained in:
Eric Leijonmarck
2022-02-07 14:12:39 +01:00
committed by GitHub
parent a8e9369084
commit 334c29eebf
8 changed files with 101 additions and 15 deletions
+5 -2
View File
@@ -71,8 +71,11 @@ func (api *ServiceAccountsAPI) CreateServiceAccount(c *models.ReqContext) respon
case err != nil:
return response.Error(http.StatusInternalServerError, "Failed to create service account", err)
}
return response.JSON(http.StatusCreated, user)
result := models.UserIdDTO{
Message: "Service account created",
Id: user.Id,
}
return response.JSON(http.StatusCreated, result)
}
func (api *ServiceAccountsAPI) DeleteServiceAccount(ctx *models.ReqContext) response.Response {