mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
Reworked Publish View
This commit is contained in:
@@ -300,9 +300,6 @@ public class APIController : Controller {
|
||||
continue;
|
||||
}
|
||||
|
||||
filename = XMLFileHelpers.StreamToString(section.Body, ModelState);
|
||||
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||
|
||||
if (hasContentDispositionHeader && contentDisposition != null) {
|
||||
if (!MultipartRequestHelper.HasFormDataContentDisposition(contentDisposition)) {
|
||||
ModelState.AddModelError("Error", $"Wrong Content-Dispostion Headers in Multipart Document");
|
||||
@@ -310,7 +307,7 @@ public class APIController : Controller {
|
||||
}
|
||||
|
||||
filename = XMLFileHelpers.StreamToString(section.Body, ModelState);
|
||||
|
||||
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -343,6 +340,6 @@ public class APIController : Controller {
|
||||
_xmlProvider.SetInProduction(newFile.First());
|
||||
_xmlService.UnUseProduction();
|
||||
|
||||
return Created("/", null);
|
||||
return Created("/", newFile.First());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user