Skip to content

Commit

Permalink
refactor: suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Wentao Kuang <[email protected]>
  • Loading branch information
blacha and Wentao-Kuang authored Jan 14, 2025
1 parent c168d5b commit 755aebe
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/lambda-analytic-cloudfront/src/log.stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface LogStats {
tileSet: string;

/**
* zoom level of the request served
* zoom level of the request served in WebMercatorQuad zoom scales
*/
z: number;

Expand Down
1 change: 0 additions & 1 deletion packages/lambda-analytic-cloudfront/src/log/referer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export function getUrlHost(ref: string): string {
export function _getUrlHost(ref: string): string {
if (ref == null) return 'unknown';
if (ref === '-') return 'unknown';
// console.log(ref)

try {
const { hostname } = new URL(ref);
Expand Down
1 change: 1 addition & 0 deletions packages/lambda-analytic-cloudfront/src/log/tile.url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface TileUrlInfo {
/** closes zoom level in web mercator quad */
webMercatorZoom: number;
}

export function parseTileUrl(status: number, url: string): TileUrlInfo | undefined {
if (!url.startsWith('/v1/tiles')) return;
if (status > 399) return;
Expand Down

0 comments on commit 755aebe

Please sign in to comment.