aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/getURLOfUser.js
blob: fe03bd65e4c25bca4a8bb6ca5b3737c703e60078 (plain)
1
2
3
4
5
6
7
8
9
var leftPad = require('left-pad')
var getWeek = require('./getWeek')

function getURLOfUsers (weekOffset, type, id) {
  return `http://${window.location.host}/meetingpointProxy/Roosters-AL%2Fdoc%2Fdagroosters%2F` +
      `${(getWeek() + weekOffset)}%2F${type}%2F${type}${leftPad(id, 5, '0')}.htm`
}

module.exports = getURLOfUsers