Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
fix bug, bugs left
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienN7 committed May 30, 2022
1 parent d7b915e commit 52e6c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public Map<String, Serializable> characterOnMediaId(@PathParam("id") int id) {
Map<String, Serializable> data = new HashMap<>();
ArrayList<Chara> characters = new ArrayList<>();
characters.addAll(em.createQuery("FROM Chara WHERE Chara.charamedia_id ="+id, Chara.class).getResultList());
data.put("person", characters);
data.put("chara", characters);
return data;
}

Expand Down
3 changes: 3 additions & 0 deletions frontend/components/media/MediaCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function AddActor({
const [acteur, setacteur] = useState(false);
const [characts, setchar] = useState<Chara[] | null>(null);


const getLinkPerso = useCallback(
async (e) => {
e.preventDefault();
Expand All @@ -231,6 +232,8 @@ function AddActor({
});
const data = await resp.json();
console.log(data);
setchar(data.chara)

},
[media.id]
);
Expand Down

0 comments on commit 52e6c7d

Please sign in to comment.