allow adding field via recipient token for signing

This commit is contained in:
Timur Ercan
2023-03-20 15:11:20 +01:00
parent dd67e1a6f0
commit 7d6bd00a22
3 changed files with 32 additions and 13 deletions

View File

@ -2,11 +2,12 @@ import toast from "react-hot-toast";
export const createOrUpdateField = async (
document: any,
field: any
field: any,
recipientToken: string = ""
): Promise<any> => {
try {
const created = await toast.promise(
fetch("/api/documents/" + document.id + "/fields", {
fetch("/api/documents/" + document.id + "/fields?token=" + recipientToken, {
method: "POST",
headers: {
"Content-Type": "application/json",