mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 01:35:32 +00:00
CMIF implementiert
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using HaWeb.Models;
|
||||
using HaWeb.FileHelpers;
|
||||
|
||||
27
HaWeb/Controllers/CMIF.cs
Normal file
27
HaWeb/Controllers/CMIF.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace HaWeb.Controllers;
|
||||
|
||||
using HaWeb.CMIF;
|
||||
using HaWeb.FileHelpers;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
[ApiController]
|
||||
public class CMIFController : Controller {
|
||||
|
||||
private IHaDocumentWrappper _lib;
|
||||
|
||||
public CMIFController(IHaDocumentWrappper lib) {
|
||||
_lib = lib;
|
||||
}
|
||||
|
||||
[Route("HKB/CMIF")]
|
||||
[HttpGet]
|
||||
[Produces("application/xml")]
|
||||
public IActionResult CMIF() {
|
||||
var lib = _lib.GetLibrary();
|
||||
if (lib != null) {
|
||||
var document = new TeiDocument(lib);
|
||||
return Ok(document);
|
||||
}
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user