Skip to content

Commit

Permalink
feat(fetcher): getProvider helper
Browse files Browse the repository at this point in the history
  • Loading branch information
philippdormann committed Apr 13, 2023
1 parent 93a6694 commit 7ef77f7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ async function getCacheItem(key) {
}
});
}
/**
* @returns {string} base url of provider
*/
function getProvider({ p, e }) {
const f = institutions.find(function (ins) {
return ins.project === p && ins.facility === e;
});
return f.provider;
}
/**
* @returns {string} (cache-backed) html content of mensaplan
*/
Expand Down

0 comments on commit 7ef77f7

Please sign in to comment.