Chat bots now default to enabled: false when created

This commit is contained in:
Cyberboss
2018-09-21 10:39:28 -04:00
parent d04e0dd8cd
commit bbdd3f805c
@@ -81,12 +81,11 @@ namespace Tgstation.Server.Host.Controllers
return BadRequest(new ErrorMessage { Message = "Invalid provider!" });
}
if (!model.Enabled.HasValue)
return BadRequest(new ErrorMessage { Message = "enabled cannot be null!" });
if (!model.ValidateProviderChannelTypes())
return BadRequest(new ErrorMessage { Message = "One or more of channels aren't formatted correctly for the given provider!" });
model.Enabled = model.Enabled ?? false;
//try to update das db first
var dbModel = new Models.ChatBot
{