Org API: enrich add user to org endpoints with user ID in the response (#27551)

This commit is contained in:
Agnès Toulet
2020-09-14 08:58:23 +02:00
committed by GitHub
parent 8759a91222
commit eb970a4985
3 changed files with 15 additions and 5 deletions

View File

@@ -123,7 +123,10 @@ func inviteExistingUserToOrg(c *models.ReqContext, user *models.User, inviteDto
}
}
return Success(fmt.Sprintf("Existing Grafana user %s added to org %s", user.NameOrFallback(), c.OrgName))
return JSON(200, util.DynMap{
"message": fmt.Sprintf("Existing Grafana user %s added to org %s", user.NameOrFallback(), c.OrgName),
"userId": user.Id,
})
}
func RevokeInvite(c *models.ReqContext) Response {