mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Use query parameters rather than long path
This commit is contained in:
@@ -6,15 +6,18 @@
|
||||
* @return {String} URL
|
||||
*/
|
||||
export function outfitURL(shipId, code, buildName) {
|
||||
let parts = ['/outfit/', shipId];
|
||||
let path = '/outfit/' + shipId;
|
||||
|
||||
let sepChar = '?';
|
||||
|
||||
if (code) {
|
||||
parts.push('/', code);
|
||||
path = path + sepChar + 'code=' + encodeURIComponent(code);
|
||||
sepChar = '&';
|
||||
}
|
||||
|
||||
if (buildName) {
|
||||
parts.push('?bn=', encodeURIComponent(buildName));
|
||||
path = path + sepChar + 'bn=' + encodeURIComponent(buildName);
|
||||
}
|
||||
return parts.join('');
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user