feat(agent): use deterministic storage keys for preset avatars (#404)

This commit is contained in:
Yiling-J
2026-09-13 21:40:34 +08:00
committed by GitHub
parent 7d56b5bf90
commit ddbf897b27
6 changed files with 58 additions and 12 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ describe('migrateLegacyAgentAvatars', () => {
const updatedAgent = await prisma.user.findUnique({
where: { id: agentUser.id },
})
expect(updatedAgent?.image).toMatch(/^files\/[A-Z0-9]{26}\.webp$/)
expect(updatedAgent?.image).toBe('files/avatars/avatar-1.webp')
const updatedAgentRecord = await prisma.agent.findUnique({
where: { id: agentUser.id },