diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-05-27 11:44:07 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-05-27 11:44:07 +0200 |
commit | 69406c43ea899c3956aa16a9e0834aff40c8510f (patch) | |
tree | 2eea9d827f0a692a63dd8e1117ba892f1300cc7d /lib/getURLOfUser.js | |
parent | 457946531c57a546eeb3c42042ad192ac9826299 (diff) |
Rewrite /meetingpointProxy into /get
This makes it simple and more secure, and this improves server logging.
Diffstat (limited to 'lib/getURLOfUser.js')
-rw-r--r-- | lib/getURLOfUser.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/getURLOfUser.js b/lib/getURLOfUser.js new file mode 100644 index 0000000..2de48e6 --- /dev/null +++ b/lib/getURLOfUser.js @@ -0,0 +1,8 @@ +const leftPad = require('left-pad') // I imported this just to piss you off ;) + +function getURLOfUser (type, index, week) { + return `http://www.meetingpointmco.nl/Roosters-AL/doc/dagroosters/` + + `${leftPad(week, 2, '0')}/${type}/${type}${leftPad(index + 1, 5, '0')}.htm` +} + +module.exports = getURLOfUser |