public async Task <ActionResult <JoinCode> > GetWorkspaceInvite(string id) { await Validate(new Entity { Id = id }); AuthorizeAny( () => Actor.IsAdmin, () => _svc.CanManage(id, Actor.Id).Result ); return(Ok( await _svc.Invite(id) )); }
public async Task <ActionResult <WorkspaceInvitation> > Invite(int id) { var state = await _workspaceService.Invite(id); return(Ok(state)); }