Exemple #1
0
        public async Task <ActionResult <Template> > LinkTemplate([FromBody] TemplateLink model)
        {
            await Validate(model);

            AuthorizeAny(
                () => Actor.IsAdmin,
                () => _svc.CanEditWorkspace(model.WorkspaceId, Actor.Id).Result
                );

            var result = await _svc.Link(model, Actor.IsCreator);

            SendBroadcast(result, "added");

            return(Ok(result));
        }