This commit is contained in:
Raktima
2026-05-22 21:03:28 +05:30
committed by GitHub
parent b9a309fa36
commit 1e228c86c3
92 changed files with 8705 additions and 5397 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,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({