Skip to content

Commit

Permalink
Merge pull request #595 from bounswe/feature/frontend_text_annotation
Browse files Browse the repository at this point in the history
Feature/frontend text annotation
  • Loading branch information
kubraaksux committed Dec 23, 2023
2 parents a7106d6 + d6613bb commit 3dbb8b4
Show file tree
Hide file tree
Showing 9 changed files with 466 additions and 199 deletions.
3 changes: 2 additions & 1 deletion resq/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"react-router-dom": "^6.11.1",
"react-scripts": "^5.0.1",
"styled-components": "^6.1.0",
"web-vitals": "^3.5.0"
"web-vitals": "^3.5.0",
"xpath-range": "^1.1.1"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
Expand Down
24 changes: 4 additions & 20 deletions resq/frontend/src/AppService.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ export function postRequestRole(userId, role) {
}

export async function getUserInfo(userId) {
const {data} = await axios.get(`${USER_API_BASE_URL}/getUserInfo?userId=${userId}`, {
headers: {
"X-Selected-Role": "VICTIM"
},
});
const {data} = await axios.get(`${USER_API_BASE_URL}/getUserInfo?userId=${userId}`);
return data
}

Expand Down Expand Up @@ -126,27 +122,15 @@ export function viewAllRequests() {
}

export function createResource(createResourceRequest) {
return axios.post(`${RESOURCE_API_BASE_URL}/createResource`, createResourceRequest, {
headers: {
"X-Selected-Role": "RESPONDER"
},
});
return axios.post(`${RESOURCE_API_BASE_URL}/createResource`, createResourceRequest);
}

export function getAllResources() {
return axios.get(`${RESOURCE_API_BASE_URL}/filterByDistance?latitude=39.5&longitude=34.5&distance=10000`, {
headers: {
"X-Selected-Role": "COORDINATOR"
},
});
return axios.get(`${RESOURCE_API_BASE_URL}/filterByDistance?latitude=39.5&longitude=34.5&distance=10000`);
}

export async function getCategoryTree() {
const {data} = await axios.get(`${CATEGORY_API_BASE_URL}/getMainCategories`, {
headers: {
"X-Selected-Role": "VICTIM"
},
});
const {data} = await axios.get(`${CATEGORY_API_BASE_URL}/getMainCategories`);

return new RootNode(data)
}
Expand Down
Loading

0 comments on commit 3dbb8b4

Please sign in to comment.