Compare commits

..

No commits in common. "c822c74f42202bcf9409f49d867cf5c9e643353a" and "5b2546fdbce07ee6441737991c9198f2d3adefa4" have entirely different histories.

2 changed files with 15 additions and 22 deletions

View File

@ -75,13 +75,8 @@ app.MapGet("/Publications/GetFromConnector", (string connectorName, string title
return taskManager.GetPublicationsFromConnector(connector, title); return taskManager.GetPublicationsFromConnector(connector, title);
}); });
app.MapGet("/Publications/GetChapters", app.MapGet("/Publications/GetChapters", (string connectorName, string internalId, bool onlyNew, bool onlyExisting, string? language) =>
(string connectorName, string internalId, string? onlyNew, string? onlyExisting, string? language) => {
{
string[] yes = { "true", "yes", "1", "y" };
bool newOnly = onlyNew is not null && yes.Contains(onlyNew);
bool existingOnly = onlyExisting is not null && yes.Contains(onlyExisting);
Connector? connector = taskManager.GetAvailableConnectors().FirstOrDefault(con => con.Key == connectorName).Value; Connector? connector = taskManager.GetAvailableConnectors().FirstOrDefault(con => con.Key == connectorName).Value;
if (connector is null) if (connector is null)
return Array.Empty<Chapter>(); return Array.Empty<Chapter>();
@ -89,9 +84,9 @@ app.MapGet("/Publications/GetChapters",
if (publication is null) if (publication is null)
return Array.Empty<Chapter>(); return Array.Empty<Chapter>();
if(newOnly) if(onlyNew)
return taskManager.GetNewChaptersList(connector, (Publication)publication, language??"en").ToArray(); return taskManager.GetNewChaptersList(connector, (Publication)publication, language??"en").ToArray();
else if (existingOnly) else if (onlyExisting)
return taskManager.GetExistingChaptersList(connector, (Publication)publication, language ?? "en").ToArray(); return taskManager.GetExistingChaptersList(connector, (Publication)publication, language ?? "en").ToArray();
else else
return connector.GetChapters((Publication)publication, language??"en"); return connector.GetChapters((Publication)publication, language??"en");

View File

@ -454,8 +454,6 @@ blur-background {
flex-wrap: wrap; flex-wrap: wrap;
justify-content: start; justify-content: start;
align-content: start; align-content: start;
max-height: 70vh;
overflow-y: scroll;
} }
#publicationViewerPopup{ #publicationViewerPopup{