I have…
- Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
- Used code blocks with ``` to format my code examples like JSON or logs properly.
I’m submitting a…
- Regression (a behavior that stopped working in a new release)
- Bug report
- Performance issue
- Documentation issue or request
Current behavior
I’ve script to check reference duplicates, but for that I need to send getJson to fetch contents
Expected behavior
Fetch content without getJson method
Minimal reproduction of the problem
if (ctx.data.nanu.iv) {
const url = `${ctx.user.claims.iss[0]}api/content/${ctx.appName}/instruction?$filter=data/SKU/iv eq '${ctx.data.nanu.iv}'&$top=2`;
const headers = {
'Authorization': `Bearer token`
};
getJSON(url, (data) => {
if (data.total > 0) {
const isDuplicate = data.items.some(item => item.id !== ctx.contentId);
if (isDuplicate) {
throw `Duplicate reference detected: cooking instruction with nanu already exist.`;
}
}
}, headers);
}
Environment
App Name: Test-app
- Self hosted with docker
- Self hosted with IIS
- Self hosted with other version
- Cloud version
Version: latest
Browser:
- Chrome (desktop)
- Chrome (Android)
- Chrome (iOS)
- Firefox
- Safari (desktop)
- Safari (iOS)
- IE
- Edge
Others: