コード例 #1
0
        public async Task <ActionResult <Workspace> > CreateWorkspace([FromBody] NewWorkspace model)
        {
            await Validate(model);

            AuthorizeAny(
                () => Actor.IsAdmin,
                () => Actor.IsCreator,
                () => _svc.CheckWorkspaceLimit(Actor.Id).Result
                );

            return(Ok(
                       await _svc.Create(model, Actor.Id, Actor.Name)
                       ));
        }