Web: Removed useless code

This commit is contained in:
Akmal Isomadinov 2024-07-30 13:15:05 +05:00
parent 46a1e1455b
commit 181f311781
2 changed files with 26 additions and 26 deletions

View File

@ -393,28 +393,28 @@ export const checkIsAuthenticated = async () => {
return isAuth.response as boolean;
};
export async function checkFillFromDraft(
templateFileId: number,
share?: string,
) {
const [checkFillFormDraft] = createRequest(
[`/files/masterform/${templateFileId}/checkfillformdraft`],
[
share ? ["Request-Token", share] : ["", ""],
["Content-Type", "application/json;charset=utf-8"],
],
"POST",
JSON.stringify({ fileId: templateFileId }),
);
// export async function checkFillFromDraft(
// templateFileId: number,
// share?: string,
// ) {
// const [checkFillFormDraft] = createRequest(
// [`/files/masterform/${templateFileId}/checkfillformdraft`],
// [
// share ? ["Request-Token", share] : ["", ""],
// ["Content-Type", "application/json;charset=utf-8"],
// ],
// "POST",
// JSON.stringify({ fileId: templateFileId }),
// );
const response = await fetch(checkFillFormDraft);
// const response = await fetch(checkFillFormDraft);
if (!response.ok) return null;
// if (!response.ok) return null;
const { response: formUrl } = await response.json();
// const { response: formUrl } = await response.json();
return formUrl as string;
}
// return formUrl as string;
// }
export async function openEdit(
fileId: number | string,

View File

@ -1180,15 +1180,15 @@ export async function getPresignedUri(fileId: number | string) {
return res;
}
export async function checkFillFormDraft(fileId: number | string) {
const res = (await request({
method: "post",
url: `files/masterform/${fileId}/checkfillformdraft`,
data: { fileId },
})) as string;
// export async function checkFillFormDraft(fileId: number | string) {
// const res = (await request({
// method: "post",
// url: `files/masterform/${fileId}/checkfillformdraft`,
// data: { fileId },
// })) as string;
return res;
}
// return res;
// }
export async function fileCopyAs(
fileId: number,