mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-29 03:09:49 +02:00
@@ -61,7 +61,7 @@ async function deleteLocalFile(fileUrl) {
|
||||
try {
|
||||
const url = new URL(fileUrl);
|
||||
const filePath = decodeURIComponent(url.pathname);
|
||||
if (!filePath.includes('/files/')) return;
|
||||
if (!filePath.includes('files')) return;
|
||||
|
||||
const localPath = url?.pathname?.split(`/files/${serverAppId}/`)?.pop();
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { appName } from '../../../Utils.js';
|
||||
import sendSystemMail from '../../parsefunction/sendSystemMail.js';
|
||||
import axios from 'axios';
|
||||
import { appName, cloudServerUrl, serverAppId } from '../../../Utils.js';
|
||||
|
||||
const serverUrl = cloudServerUrl;
|
||||
const appId = serverAppId;
|
||||
const masterKey = process.env.MASTER_KEY;
|
||||
|
||||
// Constants (adjust to your preference)
|
||||
export const OTP_LENGTH = 6;
|
||||
@@ -56,7 +60,12 @@ export async function sendDeleteOtpEmail(extUser, otp) {
|
||||
</html>
|
||||
`,
|
||||
};
|
||||
return sendSystemMail({ params });
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Parse-Application-Id': appId,
|
||||
'X-Parse-Master-Key': masterKey,
|
||||
};
|
||||
return axios.post(serverUrl + '/functions/sendmailv3', params, { headers });
|
||||
}
|
||||
|
||||
export function msUntil(nowMs, futureMs) {
|
||||
|
||||
@@ -126,7 +126,6 @@ export default async function docxtopdf(req, res) {
|
||||
try {
|
||||
// ---- Auth: current user ----
|
||||
const userRes = await axios.get(`${serverUrl}/users/me`, { headers: sessionHeader });
|
||||
const uploadedSizeBytes = req.file.size ?? req.file.buffer.length;
|
||||
|
||||
// ---- contracts_Users ----
|
||||
const whereUser = JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user