mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Fix a 500 error on invalid configuration delete request
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -291,6 +291,9 @@ namespace Tgstation.Server.Host.Controllers
|
||||
if (directory == null)
|
||||
throw new ArgumentNullException(nameof(directory));
|
||||
|
||||
if (directory.Path == null)
|
||||
return BadRequest(new ErrorMessage(ErrorCode.ModelValidationFailure));
|
||||
|
||||
if (ForbidDueToModeConflicts(directory.Path, out var systemIdentity))
|
||||
return Forbid();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user