public object Put(GrantSupportRightRequest request) { var account = Dao.FindByEmail(request.AccountEmail); if (account != null) { _commandBus.Send(new UpdateRoleToUserAccount { AccountId = account.Id, RoleName = RoleName.Support }); return(new HttpResult(HttpStatusCode.OK, "OK")); } throw new HttpError(HttpStatusCode.BadRequest, "Account not found"); }
public void GrantSupportAccess(GrantSupportRightRequest request) { var req = string.Format("/account/grantsupport"); Client.Put <string>(req, request); }