-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lambda-tiler): do not error when invalid imagery urls are provided (
#2133) * feat(lambda-tiler): allow fetching of the cutline used on the imagery * fix(lambda-tiler): support unprefixed imagery ids too * refactor: cutlines are too big do not allow sending them directly Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9e7b508
commit 8211428
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import o from 'ospec'; | ||
import { isAllowedFile } from '../imagery.js'; | ||
|
||
o.spec('ImageryRoute', () => { | ||
o('should allow geojson and json files only', () => { | ||
o(isAllowedFile('foo.geojson')).equals(true); | ||
o(isAllowedFile('foo.json')).equals(true); | ||
o(isAllowedFile('foo.tiff')).equals(false); | ||
o(isAllowedFile('foo')).equals(false); | ||
o(isAllowedFile('')).equals(false); | ||
o(isAllowedFile(null as any)).equals(false); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters