mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-07 02:07:40 +02:00
fix: createdocument, createtemplate and createdocumentwithtemplate APIs not working
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { customAPIurl } from '../../../../Utils.js';
|
||||
|
||||
// const randomId = () => Math.floor(1000 + Math.random() * 9000);
|
||||
export default async function createDocument(request, response) {
|
||||
@@ -10,8 +11,7 @@ export default async function createDocument(request, response) {
|
||||
const base64File = request.body.file;
|
||||
const fileData = request.files?.[0] ? request.files[0].buffer : null;
|
||||
// console.log('fileData ', fileData);
|
||||
const url = new URL(process.env.SERVER_URL);
|
||||
let protocol = url.origin;
|
||||
const protocol = customAPIurl();
|
||||
|
||||
try {
|
||||
const reqToken = request.headers['x-api-token'];
|
||||
@@ -128,4 +128,4 @@ export default async function createDocument(request, response) {
|
||||
console.log('err ', err);
|
||||
return response.status(400).json({ error: 'Something went wrong!' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user