diff --git a/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs b/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs index f942863b37..aecf50f624 100644 --- a/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs +++ b/src/Tgstation.Server.Host/Controllers/ConfigurationController.cs @@ -128,27 +128,15 @@ namespace Tgstation.Server.Host.Controllers [TgsAuthorize(ConfigurationRights.List)] public override Task List(CancellationToken cancellationToken) => Directory(null, cancellationToken); - /// - /// Create an empty directory at a - /// - /// The path of the directory to get - /// The for the operation - /// A resulting in the for the operation - [HttpPut("List/{*directoryPath}")] - [TgsAuthorize(ConfigurationRights.List)] - public async Task CreateDirectory(string directoryPath, CancellationToken cancellationToken) + /// + public override async Task Create(ConfigurationFile model, CancellationToken cancellationToken) { if (ForbidDueToModeConflicts()) return Forbid(); try { - var result = new ConfigurationFile - { - IsDirectory = true, - Path = directoryPath - }; - return await instanceManager.GetInstance(Instance).Configuration.CreateDirectory(directoryPath, AuthenticationContext.SystemIdentity, cancellationToken).ConfigureAwait(false) ? (IActionResult)Json(result) : StatusCode((int)HttpStatusCode.Created); + return await instanceManager.GetInstance(Instance).Configuration.CreateDirectory(model.Path, AuthenticationContext.SystemIdentity, cancellationToken).ConfigureAwait(false) ? (IActionResult)Json(model) : StatusCode((int)HttpStatusCode.Created, model); } catch (NotImplementedException) {