Revert "v2.39.0 (#2180)"

This reverts commit 1e228c86c3.
This commit is contained in:
Raktima
2026-05-25 17:24:36 +05:30
committed by GitHub
parent 1e228c86c3
commit 7b4d0bf052
92 changed files with 5372 additions and 8680 deletions
@@ -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({