updates to uuids to be consistent

This commit is contained in:
Devin Zuczek
2026-07-10 00:10:03 -04:00
parent 43c3bd93be
commit 1f70adbd67
7 changed files with 26 additions and 14 deletions
+6 -2
View File
@@ -325,7 +325,9 @@ describe('images', () => {
})
expect(res.status).toBe(200)
const { ImageName } = (await res.json()) as { ImageName: string }
expect(ImageName).toMatch(/^\d{4}-\d{2}-\d{2}\/[0-9a-f]+\.png$/)
expect(ImageName).toMatch(
/^\d{4}-\d{2}-\d{2}\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.png$/
)
// The object is in the shared bucket under that key.
const stored = await env.IMAGES.get(ImageName)
@@ -470,7 +472,9 @@ describe('images', () => {
})
expect(res.status).toBe(200)
const { ImageName } = (await res.json()) as { ImageName: string }
expect(ImageName).toMatch(/^\d{4}-\d{2}-\d{2}\/[0-9a-f]+\.jpg$/)
expect(ImageName).toMatch(
/^\d{4}-\d{2}-\d{2}\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.jpg$/
)
// The account row now points its profileImage at the uploaded key.
const row = await env.DB.prepare('SELECT data FROM accounts WHERE account_id = 42').first<{