fix: shift the fonts.css file to CDN, ensure emails are sent to all signers when sendInOrder is set to false in public-sign, and add validation for the sequence of public roles when sendInOrder is enabled

This commit is contained in:
RaktimaNXG
2024-07-18 18:56:42 +05:30
parent 4b1e13d39a
commit c59c921a8b
16 changed files with 228 additions and 28518 deletions
@@ -4,17 +4,22 @@ const appId = process.env.APP_ID;
export default async function getSubscription(request) {
const extUserId = request.params.extUserId || '';
const contactId = request.params.contactId || '';
const ispublic = request.params.ispublic || false;
if (extUserId) {
try {
const userRes = await axios.get(serverUrl + '/users/me', {
headers: {
'X-Parse-Application-Id': appId,
'X-Parse-Session-Token': request.headers['sessiontoken'],
},
});
const userId = userRes.data && userRes.data.objectId;
if (userId) {
let userId;
//`ispublic` is used in public profile to get subscription details
if (!ispublic) {
const userRes = await axios.get(serverUrl + '/users/me', {
headers: {
'X-Parse-Application-Id': appId,
'X-Parse-Session-Token': request.headers['sessiontoken'],
},
});
userId = userRes.data && userRes.data.objectId;
}
if (userId || ispublic) {
const extCls = new Parse.Query('contracts_Users');
const exUser = await extCls.get(extUserId, { useMasterKey: true });
if (exUser) {