From 05ad21983f1bf56660df36071909a17dec092019 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 9 Jan 2023 22:22:53 +0100 Subject: [PATCH] fix publisher --- src/main/java/com/covas/Entity/PublisherEntity.java | 2 ++ src/main/java/com/covas/Resources/PublisherRessources.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/main/java/com/covas/Entity/PublisherEntity.java b/src/main/java/com/covas/Entity/PublisherEntity.java index fc5ea32..0c426ef 100644 --- a/src/main/java/com/covas/Entity/PublisherEntity.java +++ b/src/main/java/com/covas/Entity/PublisherEntity.java @@ -2,6 +2,7 @@ package com.covas.Entity; import java.io.Serializable; import java.time.LocalDateTime; +import java.util.Collection; import java.util.List; import java.util.UUID; @@ -16,6 +17,7 @@ import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; +import javax.persistence.OneToMany; import javax.persistence.CascadeType; import org.hibernate.annotations.ColumnDefault; diff --git a/src/main/java/com/covas/Resources/PublisherRessources.java b/src/main/java/com/covas/Resources/PublisherRessources.java index aa32769..9d7ff12 100644 --- a/src/main/java/com/covas/Resources/PublisherRessources.java +++ b/src/main/java/com/covas/Resources/PublisherRessources.java @@ -155,6 +155,7 @@ public class PublisherRessources { } } Response responseHttp = Response.status(status).build(); + if (status.equals(Response.Status.OK)) { responseHttp = Response.status(status).entity(new PublisherByUser(user.pseudo, user.publisher)) .build();