diff --git a/RMuseum/Controllers/GanjoorController.cs b/RMuseum/Controllers/GanjoorController.cs index 8c8fb867..22b90265 100644 --- a/RMuseum/Controllers/GanjoorController.cs +++ b/RMuseum/Controllers/GanjoorController.cs @@ -3740,6 +3740,22 @@ namespace RMuseum.Controllers return Ok(); } + /// + /// import paper sources from museum + /// + /// + [HttpPut] + [Route("papersources/import")] + [Authorize(Policy = RMuseumSecurableItem.GanjoorEntityShortName + ":" + RMuseumSecurableItem.ModerateOperationShortName)] + [ProducesResponseType((int)HttpStatusCode.OK)] + [ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))] + [ProducesResponseType((int)HttpStatusCode.NotFound)] + public IActionResult ImportPaperSourcesFromMuseum() + { + _ganjoorService.ImportPaperSourcesFromMuseum(); + return Ok(); + } + /// /// get paper sources for a catgeory /// diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml index 6de8fd73..6fc2dacb 100644 --- a/RMuseum/RMuseum.xml +++ b/RMuseum/RMuseum.xml @@ -2047,6 +2047,12 @@ + + + import paper sources from museum + + + get paper sources for a catgeory @@ -16208,6 +16214,11 @@ + + + import paper sources from museum + + category paper sources diff --git a/RMuseum/Services/IGanjoorService.cs b/RMuseum/Services/IGanjoorService.cs index 12c39e4f..e336bace 100644 --- a/RMuseum/Services/IGanjoorService.cs +++ b/RMuseum/Services/IGanjoorService.cs @@ -1230,6 +1230,11 @@ namespace RMuseum.Services /// void ImportNaskbanGanjoorPoemMatchFindings(string naskbanUserName, string naskbanPassword); + /// + /// import paper sources from museum + /// + void ImportPaperSourcesFromMuseum(); + /// /// category paper sources /// diff --git a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-PaperSources.cs b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-PaperSources.cs index d0c62459..c4cf5988 100644 --- a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-PaperSources.cs +++ b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-PaperSources.cs @@ -9,8 +9,7 @@ using RMuseum.DbContext; using RSecurityBackend.Services.Implementation; using RSecurityBackend.Models.Generic.Db; using System.Collections.Generic; -using RMuseum.Models.PDFLibrary; -using System.Reflection.PortableExecutable; + namespace RMuseum.Services.Implementation {