From 364e59be57a42e61eafb42a271da7098fb3a2127 Mon Sep 17 00:00:00 2001 From: Ehren Kret Date: Thu, 28 Apr 2022 23:58:28 -0500 Subject: [PATCH] Add shape to duration to ensure it's render as an integer --- .../textsecuregcm/entities/PurchasableBadge.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/entities/PurchasableBadge.java b/service/src/main/java/org/whispersystems/textsecuregcm/entities/PurchasableBadge.java index 05aa14f3e..02819b853 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/entities/PurchasableBadge.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/entities/PurchasableBadge.java @@ -6,6 +6,8 @@ package org.whispersystems.textsecuregcm.entities; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonFormat.Shape; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.util.List; @@ -40,6 +42,7 @@ public class PurchasableBadge extends Badge { this.duration = duration; } + @JsonFormat(shape = Shape.NUMBER_INT) public Duration getDuration() { return duration; }