split remaining utilities from shared

This commit is contained in:
Matteo Pagliazzi
2016-03-08 19:35:02 +01:00
parent bb6f0f4252
commit 986bfd8035
14 changed files with 266 additions and 246 deletions

View File

@@ -0,0 +1,9 @@
/*
Encode the download link for .ics iCal file
*/
module.exports = function(uid, apiToken) {
var loc, ref;
loc = (typeof window !== "undefined" && window !== null ? window.location.host : void 0) || (typeof process !== "undefined" && process !== null ? (ref = process.env) != null ? ref.BASE_URL : void 0 : void 0) || '';
return encodeURIComponent("http://" + loc + "/v1/users/" + uid + "/calendar.ics?apiToken=" + apiToken);
};