mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-22 17:44:55 +02:00
v2.39.0 (#2180)
This commit is contained in:
@@ -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,9 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { appName, cloudServerUrl, serverAppId } from '../../../Utils.js';
|
||||
|
||||
const serverUrl = cloudServerUrl;
|
||||
const appId = serverAppId;
|
||||
const masterKey = process.env.MASTER_KEY;
|
||||
import { appName } from '../../../Utils.js';
|
||||
import sendSystemMail from '../../parsefunction/sendSystemMail.js';
|
||||
|
||||
// Constants (adjust to your preference)
|
||||
export const OTP_LENGTH = 6;
|
||||
@@ -60,12 +56,7 @@ export async function sendDeleteOtpEmail(extUser, otp) {
|
||||
</html>
|
||||
`,
|
||||
};
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Parse-Application-Id': appId,
|
||||
'X-Parse-Master-Key': masterKey,
|
||||
};
|
||||
return axios.post(serverUrl + '/functions/sendmailv3', params, { headers });
|
||||
return sendSystemMail({ params });
|
||||
}
|
||||
|
||||
export function msUntil(nowMs, futureMs) {
|
||||
|
||||
@@ -126,6 +126,7 @@ 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