aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-02-25 16:59:23 -0800
committerAnton Tananaev <anton@traccar.org>2024-02-25 16:59:23 -0800
commit89fba5afc13ab885554a8eaab41722f31f3642f4 (patch)
tree56a361d521ad7950505de4b40a46b6f560051806 /src/main/java/org/traccar
parentf5257e0da276949d43eaa36b9284fc4d59845637 (diff)
downloadtrackermap-server-89fba5afc13ab885554a8eaab41722f31f3642f4.tar.gz
trackermap-server-89fba5afc13ab885554a8eaab41722f31f3642f4.tar.bz2
trackermap-server-89fba5afc13ab885554a8eaab41722f31f3642f4.zip
Update notification message model
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/notification/NotificationMessage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/notification/NotificationMessage.java b/src/main/java/org/traccar/notification/NotificationMessage.java
index ca849385a..551a2d823 100644
--- a/src/main/java/org/traccar/notification/NotificationMessage.java
+++ b/src/main/java/org/traccar/notification/NotificationMessage.java
@@ -16,12 +16,16 @@
*/
package org.traccar.notification;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
public class NotificationMessage {
private final String subject;
private final String body;
- public NotificationMessage(String subject, String body) {
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ public NotificationMessage(@JsonProperty("subject") String subject, @JsonProperty("body") String body) {
this.subject = subject;
this.body = body;
}