mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed verification trigger for imports
refs: https://github.com/TryGhost/Toolbox/issues/293 This import verification check now works by testing all imports in the last 30 days.
This commit is contained in:
parent
dec282345f
commit
5d62758e64
1 changed files with 2 additions and 10 deletions
|
@ -58,17 +58,9 @@ const membersImporter = new MembersCSVImporter({
|
|||
|
||||
const processImport = async (options) => {
|
||||
const result = await membersImporter.process(options);
|
||||
const importSize = result.meta.originalImportSize;
|
||||
delete result.meta.originalImportSize;
|
||||
|
||||
const importThreshold = await verificationTrigger.getImportThreshold();
|
||||
if (importSize > importThreshold) {
|
||||
await verificationTrigger.startVerificationProcess({
|
||||
amountImported: importSize,
|
||||
throwOnTrigger: true,
|
||||
source: 'import'
|
||||
});
|
||||
}
|
||||
// Check whether all imports in last 30 days > threshold
|
||||
await verificationTrigger.testImportThreshold();
|
||||
|
||||
return result;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue