Initialize repo and add session changes (2025-09-08)

This commit is contained in:
Auto Commit
2025-09-08 14:03:43 +02:00
commit 44ab0a534b
327 changed files with 40952 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { getDeviceId } from '../lib/device';
export async function likePhoto(id: number): Promise<number> {
const res = await fetch(`/api/v1/photos/${id}/like`, {
method: 'POST',
headers: {
'X-Device-Id': getDeviceId(),
'Content-Type': 'application/json',
},
});
if (!res.ok) throw new Error('like failed');
const json = await res.json();
return json.likes_count ?? 0;
}