Skip to content

Commit

Permalink
[#186] Fixed wrong api call
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan committed Jul 19, 2024
1 parent bd243ae commit 89ad126
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/actions/RecordActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ export function createRecord(record) {
return async function (dispatch, getState) {
dispatch(saveRecordPending(ACTION_FLAG.CREATE_ENTITY));
try {
const userResponse = await axiosBackend.get(`/users/current`);
const userResponse = await axiosBackend.get(`${API_URL}/rest/users/current`);
const user = userResponse.data;

console.log(userResponse);
console.log(user);
if (user.institution == null) {
const institutionError = new Error("User is not assigned to any institution");
institutionError.response = { data: { messageId: "error.no-institution" } }; // Custom messageId for this specific error
Expand Down

0 comments on commit 89ad126

Please sign in to comment.