Skip to content

feat: tile cooldown support#5

Merged
melancholiai merged 14 commits intomasterfrom
cooldown-support
Dec 8, 2024
Merged

feat: tile cooldown support#5
melancholiai merged 14 commits intomasterfrom
cooldown-support

Conversation

@melancholiai
Copy link
Copy Markdown
Contributor

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

@melancholiai melancholiai changed the title Cooldown support feat: tile cooldown support Nov 21, 2024
(msg: string, ...args: unknown[]): void;
}

type BBox = [number, number, number, number];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use BoundingBox type from geojson package instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geojson's BBox is either [number, number, number, number] | [number, number, number, number, number, number], I prefer to have more precision

Comment thread packages/backend/src/common/util.ts Outdated
export const keyfy = (params: TileParamsWithKit): string => `${TILE_DETAILS_KEY_PREFIX}:${params.kit}:${params.z}/${params.x}/${params.y}`;

export const hashValue = (value: unknown): string => {
const hash = createHash('md5');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MD5 hash as been proven to be vurnable to a collision attack. We might have to look for another hash function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@melancholiai melancholiai merged commit cbcd578 into master Dec 8, 2024
@melancholiai melancholiai deleted the cooldown-support branch December 8, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants