mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 08:00:19 +01:00
Chat bots now default to enabled: false when created
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user