Browse Source

fixed problem with mime being null in Attachment

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
main
Stephan Richter 4 months ago
parent
commit
dcfc2414b3
  1. 2
      de.srsoftware.cal.api/src/main/java/de/srsoftware/cal/api/Attachment.java
  2. 4
      de.srsoftware.cal.importer/src/main/java/de/srsoftware/cal/importer/weimar/CKeller.java

2
de.srsoftware.cal.api/src/main/java/de/srsoftware/cal/api/Attachment.java

@ -12,6 +12,6 @@ import org.json.JSONObject; @@ -12,6 +12,6 @@ import org.json.JSONObject;
*/
public record Attachment(URL url, String mime) {
public JSONObject json() {
return new JSONObject(Map.of("url", url.toString(), "mime", mime));
return new JSONObject(Map.of("url", url.toString(), "mime", mime == null ? "content/unknown" : mime));
}
}

4
de.srsoftware.cal.importer/src/main/java/de/srsoftware/cal/importer/weimar/CKeller.java

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
package de.srsoftware.cal.importer.weimar;
public class CKeller {
}
Loading…
Cancel
Save