chore: lint + comment

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
Andrew Calcutt 2023-09-26 10:07:22 -04:00
parent fd5737044a
commit c72e44b3fd
2 changed files with 8 additions and 8 deletions

View file

@ -162,7 +162,7 @@ const extractPathsFromQuery = (query, transformer) => {
providedPath.includes('enc:') && providedPath.includes('enc:') &&
PATH_PATTERN.test(decodeURIComponent(providedPath)) PATH_PATTERN.test(decodeURIComponent(providedPath))
) { ) {
// +4 because enc: are 4 characters, everything after enc: is considered to be part of the polyline // +4 because 'enc:' is 4 characters, everything after 'enc:' is considered to be part of the polyline
const encIndex = providedPath.indexOf('enc:') + 4; const encIndex = providedPath.indexOf('enc:') + 4;
const coords = polyline const coords = polyline
.decode(providedPath.substring(encIndex)) .decode(providedPath.substring(encIndex))

View file

@ -174,13 +174,13 @@ describe('Static endpoints', function () {
describe('encoded path', function () { describe('encoded path', function () {
testStatic( testStatic(
prefix, prefix,
'auto/20x20', 'auto/20x20',
'png', 'png',
200, 200,
2, 2,
/image\/png/, /image\/png/,
'?path='+decodeURIComponent('enc:{{biGwvyGoUi@s_A|{@'), '?path=' + decodeURIComponent('enc:{{biGwvyGoUi@s_A|{@'),
); );
}); });
}); });