Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't wait for csam call to complete #98

Open
wants to merge 4 commits into
base: stage
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update workflow-photoshop.js
  • Loading branch information
Ruchika4 authored Aug 15, 2024
commit 3e2839f23f52b2c743f7549cc4b773ea5e8e72db
Original file line number Diff line number Diff line change
@@ -23,12 +23,12 @@ function addOrUpdateOperation(array, keyToCheck, valueToCheck, keyToUpdate, newV
}
}

async function scanForCsam(cfg, id, unityEl, targetEl, refreshWidgetEvent) {
async function scanForCsam(cfg, id, unityEl, refreshWidgetEvent) {
const { scanImgForSafety } = await import('../../steps/upload-step.js');
let scanResponse = await scanImgForSafety(cfg, id);
if (scanResponse.status === 403) {
unityEl.dispatchEvent(new CustomEvent(refreshWidgetEvent));
await showErrorToast(targetEl, unityEl, '.icon-error-acmp');
//await showErrorToast(targetEl, unityEl, '.icon-error-acmp');
return false;
}
if (scanResponse.status === 429
@@ -174,7 +174,7 @@ async function removeBgHandler(cfg, changeDisplay = true) {
return false;
}
if (isImgModified) {
scanForCsam(cfg, id, unityEl, targetEl, refreshWidgetEvent);
scanForCsam(cfg, id, unityEl, refreshWidgetEvent );
Ruchika4 marked this conversation as resolved.
Show resolved Hide resolved
}
cfg.preludeState.assetId = id;
const removeBgOptions = {