From 404e24552bedd059ed82a8180a8579d13ef9c2a1 Mon Sep 17 00:00:00 2001 From: Stephanya Casanova Date: Fri, 18 Oct 2024 11:49:38 +0200 Subject: [PATCH] [backend] Update dto upsert payload --- .../openbas/rest/payload/form/PayloadUpsertInput.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java b/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java index f59d5326b3..bfad9ef897 100644 --- a/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java +++ b/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java @@ -1,9 +1,11 @@ package io.openbas.rest.payload.form; import com.fasterxml.jackson.annotation.JsonProperty; +import io.openbas.database.model.Payload; import io.openbas.database.model.PayloadArgument; import io.openbas.database.model.PayloadPrerequisite; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.Setter; @@ -23,13 +25,13 @@ public class PayloadUpsertInput { @JsonProperty("payload_name") private String name; - @NotBlank(message = MANDATORY_MESSAGE) + @NotNull(message = MANDATORY_MESSAGE) @JsonProperty("payload_source") - private String source; + private Payload.PAYLOAD_SOURCE source; - @NotBlank(message = MANDATORY_MESSAGE) + @NotNull(message = MANDATORY_MESSAGE) @JsonProperty("payload_status") - private String status; + private Payload.PAYLOAD_STATUS status; @NotBlank(message = MANDATORY_MESSAGE) @JsonProperty("payload_external_id")