Files
PacketStation/frontend/src/api/stamp.ts
T

16 lines
616 B
TypeScript
Raw Normal View History

// The stamp check (change C9): Admin, Q.C. and Clerical check a printed or saved copy against the print log.
// /api/stamp-verify and /api/stamp-verify/pdf take the same bodies and answer the same as the /api/admin aliases.
import type { StampResult } from "./admin";
import { api } from "./client";
export type { StampResult };
export const stampApi = {
verify: (text: string) => api.post<StampResult>("/api/stamp-verify", { text }),
verifyPdf: (file: File) => {
const fd = new FormData();
fd.append("file", file);
return api.post<{ stamps: StampResult[] }>("/api/stamp-verify/pdf", fd);
},
};