Finish first part of creating the full list of routes

This commit is contained in:
itsfinniii
2026-03-15 12:04:28 +01:00
parent ff811327bb
commit 4f3cc40041
8 changed files with 128 additions and 6 deletions

12
astro/src/lib/hash.ts Normal file
View File

@@ -0,0 +1,12 @@
import md5 from "md5";
export function getPhotoHash(photo: PhotoAlbumPhoto) {
const hash = md5(JSON.stringify({
id: photo.id,
url: photo.photo.url,
width: photo.photo.width,
height: photo.photo.height
}));
return hash.substring(hash.length - 10);
}