Finish first part of creating the full list of routes
This commit is contained in:
12
astro/src/lib/hash.ts
Normal file
12
astro/src/lib/hash.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user