Merge pull request

This commit is contained in:
prafull-opensignlabs
2026-03-04 07:31:19 +00:00
parent 2e2e535b70
commit acb0f3083c
158 changed files with 40172 additions and 1456 deletions
@@ -1,28 +1,27 @@
import { useLocal } from '../../Utils.js';
import getPresignedUrl, { presignedlocalUrl } from './getSignedUrl.js';
const resolveUrl = async rawUrl => {
const isLocal = useLocal == 'true';
const shouldUsePresigned = useLocal !== 'true';
if (!rawUrl) return rawUrl;
if (shouldUsePresigned) {
return await getPresignedUrl(rawUrl);
} else if (isLocal) {
return presignedlocalUrl(rawUrl);
}
};
async function TenantAterFind(request) {
if (useLocal !== 'true') {
if (request.objects.length === 1) {
if (request.objects) {
const obj = request.objects[0];
const Logo = obj?.get('Logo') && obj?.get('Logo');
if (Logo) {
obj.set('Logo', getPresignedUrl(Logo));
}
return [obj];
}
}
} else if (useLocal == 'true') {
if (request.objects.length === 1) {
if (request.objects) {
const obj = request.objects[0];
const Logo = obj?.get('Logo') && obj?.get('Logo');
if (Logo) {
obj.set('Logo', presignedlocalUrl(Logo));
}
return [obj];
}
if (request.objects.length === 1) {
if (request.objects) {
const obj = request.objects[0];
const Logo = obj?.get('Logo') && obj?.get('Logo');
const Favicon = obj?.get('Favicon') && obj?.get('Favicon');
if (Logo) obj.set('Logo', await resolveUrl(Logo));
if (Favicon) obj.set('Favicon', await resolveUrl(Favicon));
return [obj];
}
}
}