Skip to content

Commit

Permalink
[DUOS-2176][risk=no] Remove unused code (#1875)
Browse files Browse the repository at this point in the history
* remove unused code
  • Loading branch information
rushtong authored Nov 3, 2022
1 parent 46db0f3 commit 6a1cb57
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions src/libs/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,6 @@ export const DAR = {
return res.data;
},

requiresManualReview: (object) => {
var manualReview = false;
object.forEach(function (element) {
if (element.manualReview === true) {
manualReview = true;
}
});
return manualReview;
},

//NOTE: endpoints requires a dar id
uploadDARDocument: async(file, darId, fileType) => {
if(isFileEmpty(file)) {
Expand Down Expand Up @@ -326,12 +316,6 @@ export const DataSet = {
return await res.json();
},

getDatasetByIdV2: async id => {
const url = `${await getApiUrl()}/api/dataset/v2/${id}`;
const res = await fetchOk(url, Config.authOpts());
return await res.json();
},

downloadDataSets: async (objectIdList, fileName) => {
const url = `${await getApiUrl()}/api/dataset/download`;
const res = await fetchOk(url, fp.mergeAll([Config.jsonBody(objectIdList), Config.fileOpts(), { method: 'POST' }]));
Expand Down Expand Up @@ -408,32 +392,6 @@ export const DatasetAssociation = {

};

export const Election = {

findElectionByDarId: async (requestId) => {
const url = `${await getApiUrl()}/api/dataRequest/${requestId}/election`;
const res = await fetchOk(url, Config.authOpts());
return await res.json();
},

findDataAccessElectionReview: async (electionId) => {
const url = `${await getApiUrl()}/api/electionReview/access/${electionId}`;
const res = await fetchOk(url, Config.authOpts());
return await res.json();
},

// RP Election Information. Can be null for manual review DARs.
// N.B. We get the rpElectionReview from the Access election id, not the rp election id. This is a legacy behavior.
findRPElectionReview: async (electionId) => {
const url = `${await getApiUrl()}/api/electionReview/rp/${electionId}`;
const res = await fetchOk(url, Config.authOpts());
if (res.status === 204) {
return {};
}
return await res.json();
}
};

export const Email = {
sendReminderEmail: async (voteId) => {
const url = `${await getApiUrl()}/api/emailNotifier/reminderMessage/${voteId}`;
Expand Down Expand Up @@ -510,12 +468,6 @@ export const Support = {

export const Match = {

findMatch: async (consentId, purposeId) => {
const url = `${await getApiUrl()}/api/match/${consentId}/${purposeId}`;
const res = await fetchOk(url, Config.authOpts());
return res.json();
},

findMatchBatch: async (purposeIdsArr = []) => {
const purposeIds = purposeIdsArr.join(',');
const url = `${await getApiUrl()}/api/match/purpose/batch`;
Expand Down
Empty file removed src/pages/wip.js
Empty file.

0 comments on commit 6a1cb57

Please sign in to comment.