Fix guest upload queue endpoint
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user