format and adaptation for front
This commit is contained in:
parent
0c222fffc5
commit
1c244aaefa
@ -12,7 +12,6 @@ import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.SequenceGenerator;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -50,7 +49,9 @@ public class Ji {
|
||||
inverseJoinColumns = @JoinColumn(name = "user_id"))
|
||||
public List<User> participants;
|
||||
|
||||
@OneToMany @JoinColumn(name = "instance_id") public List<Instance> instances;
|
||||
@OneToMany
|
||||
@JoinColumn(name = "instance_id")
|
||||
public List<Instance> instances;
|
||||
|
||||
public Ji(String name, String description, List<User> respos, String date,
|
||||
Site site) {
|
||||
|
||||
@ -30,9 +30,11 @@ public class Endpoints {
|
||||
@Authenticated
|
||||
@Path("dashboard")
|
||||
public Response getDashboard() {
|
||||
User user = userService.getUser(identity.getPrincipal().getName());
|
||||
String username = identity.getPrincipal().getName();
|
||||
User user = userService.getUser(username);
|
||||
DashboardResponse dashboard = new DashboardResponse();
|
||||
dashboard.roles = user.getRoles();
|
||||
dashboard.name = username;
|
||||
|
||||
dashboard.jiRespo = user.jiRespo;
|
||||
dashboard.jiParticipant = user.jiParticipant;
|
||||
|
||||
@ -16,7 +16,7 @@ import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
|
||||
@Path("/api/ji")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
public class JiResource {
|
||||
public class JiEndpoints {
|
||||
|
||||
@Inject SecurityIdentity identity;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user