Skip to content

Commit

Permalink
update associations endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
isidzukuri committed Jan 4, 2025
1 parent 5f995d3 commit 8306d0d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/ThoughtsAssociations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ const ThoughtsAssociations = () => {

const apiAdapter = CrudAdapter(process.env.REACT_APP_BE_API_URL);
const thoughtsRepository = CrudDataRepository(apiAdapter, 'api/thoughts');
const associatonsRepository = CrudDataRepository(apiAdapter, 'api/associations');

useEffect(() => {
const fetchAssociations = async () => {
const data = await associatonsRepository.getItemById(id);
const data = await thoughtsRepository.getItemById(id+"/associations");
setAssociatons(data);
};
fetchAssociations();
Expand Down

0 comments on commit 8306d0d

Please sign in to comment.