From b3c7dd67e84150d6656965dcca446741c281b0fa Mon Sep 17 00:00:00 2001 From: David Guler Date: Fri, 9 Dec 2022 15:27:14 +0100 Subject: [PATCH] fix: remove "done" field from json serialisation --- src/main/java/ch/zhaw/gartenverwaltung/types/Task.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/Task.java b/src/main/java/ch/zhaw/gartenverwaltung/types/Task.java index a0ff6ba..d235918 100644 --- a/src/main/java/ch/zhaw/gartenverwaltung/types/Task.java +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/Task.java @@ -1,5 +1,7 @@ package ch.zhaw.gartenverwaltung.types; +import com.fasterxml.jackson.annotation.JsonIgnore; + import java.time.LocalDate; import java.util.Optional; @@ -121,6 +123,7 @@ public class Task { } } + @JsonIgnore public boolean isDone(){ return nextExecution == null; }