Möglichkeit zur Angabe eines zeitraumes für die angezeigten Briefe

This commit is contained in:
Simon Martens
2023-05-08 16:39:14 +02:00
parent 5093951f7a
commit 87337ea992
15 changed files with 91 additions and 19 deletions

View File

@@ -343,8 +343,18 @@ public class APIController : Controller {
if (!ModelState.IsValid) return BadRequest(ModelState);
_xmlProvider.SetInProduction(newFile.First());
_xmlService.UnUseProduction();
return Created("/", newFile.First());
}
[HttpPost]
[Route("API/SetStartEndYear")]
[ValidateAntiForgeryToken]
[FeatureGate(Features.UploadService, Features.AdminService)]
public async Task<IActionResult>? SetStartEndYear(StartEndYear startendyear) {
if (startendyear.StartYear > startendyear.EndYear) return BadRequest();
_lib.SetStartEndYear(startendyear.StartYear, startendyear.EndYear);
return Created("/", "");;
}
}