From 89fba5afc13ab885554a8eaab41722f31f3642f4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 25 Feb 2024 16:59:23 -0800 Subject: Update notification message model --- src/main/java/org/traccar/notification/NotificationMessage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') 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; } -- cgit v1.2.3