public IActionResult CreateScript(ScriptViewModel scriptVM) { if (_scriptService.CreateScript(scriptVM, User.Identity.Name)) { return(Ok()); } else { return(BadRequest()); } }
public async Task <Script> CreateScript(ScriptData script) { logger.LogInformation("Creating new script {scriptname}", script.Name); return(await scriptservice.GetScript(await scriptservice.CreateScript(script))); }