Skip to content

Commit

Permalink
#1033 | Introduce getSubjectByUUID on IndividualService
Browse files Browse the repository at this point in the history
  • Loading branch information
Suhas Vishwanath committed Jun 21, 2023
1 parent f41f353 commit 9ca09a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/services/IndividualService.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class IndividualService {
.then(subjects => map(subjects, subject => mapIndividual(subject)));
}

getSubjectByUUID(uuid) {
return api.getSubjectByUUID(uuid);
}

}

export const individualService = new IndividualService();
4 changes: 4 additions & 0 deletions src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default {
axios
.get(BASE_URL + `/subject/search?addressLevelUUID=${addressLevelUUID}&subjectTypeName=${subjectTypeName}`)
.then(response => get(response, 'data')),
getSubjectByUUID: (uuid) =>
axios
.get(BASE_URL + `/web/individual/${uuid}`)
.then(response => get(response, 'data')),
getCognitoDetails: () => axios.get(`${BASE_URL}/cognito-details`, {
headers: {
"AUTH-TOKEN": "",
Expand Down

0 comments on commit 9ca09a3

Please sign in to comment.