added importer for CafeWagner

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-01-02 00:52:21 +01:00
parent e0dde9aa9e
commit 3f80b13d8e
9 changed files with 270 additions and 59 deletions
@@ -251,8 +251,8 @@ public class ApiEndpoint extends PathHandler {
json.getJSONArray(ATTACHMENTS).forEach(att -> {
Payload //
.of(att.toString())
.map(BaseImporter::url)
.map(BaseImporter::toAttachment)
.map(Util::url)
.map(Util::toAttachment)
.optional()
.ifPresent(event::add);
});
@@ -293,7 +293,7 @@ public class ApiEndpoint extends PathHandler {
try {
var description = json.getString(DESCRIPTION);
return Payload.of(json.getString(URL))
.map(BaseImporter::url)
.map(Util::url)
.map(url -> BaseImporter.link(url, description));
} catch (Exception e) {
return error(e, "Failed to create link from %s", json);
@@ -20,7 +20,6 @@
</span>
<table id="eventlist">
<tr class="head">
<th>ID</th>
<th>Start
<div class="buttons">
@@ -22,7 +22,7 @@ function addRow(json){
var tagList = json.tags.join(' ');
row.setAttribute('class',tagList);
}
addCell(row,json.id,json.id);
//addCell(row,json.id,json.id);
addCell(row,json.start,json.id);
addCell(row,json.end,json.id);
addCell(row,json.title,json.id);