Fix guest upload queue endpoint
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-30 13:06:26 +01:00
parent 4b1785fb85
commit 96aaea23e4
2 changed files with 16 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ import { createUpload } from './xhr';
import { notify } from './notify';
type SyncManager = { register(tag: string): Promise<void>; };
export const buildQueueUploadUrl = (eventToken: string) =>
`/api/v1/events/${encodeURIComponent(eventToken)}/upload`;
export type QueueItem = {
id?: number;
eventToken: string;
@@ -81,7 +84,7 @@ async function attemptUpload(it: QueueItem): Promise<boolean> {
if (!navigator.onLine) return false;
try {
const json = await createUpload(
`/api/v1/events/${encodeURIComponent(it.eventToken)}/photos`,
buildQueueUploadUrl(it.eventToken),
it,
getDeviceId(),
(pct) => {