Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
22 lines
729 B
Plaintext
22 lines
729 B
Plaintext
export const buildAfterOperation = async (operationArgs)=>{
|
|
const { args, collection, operation, overrideAccess, result } = operationArgs;
|
|
let newResult = result;
|
|
if (args.collection.config.hooks?.afterOperation?.length) {
|
|
for (const hook of args.collection.config.hooks.afterOperation){
|
|
const hookResult = await hook({
|
|
args,
|
|
collection,
|
|
operation,
|
|
overrideAccess,
|
|
req: args.req,
|
|
result: newResult
|
|
});
|
|
if (hookResult !== undefined) {
|
|
newResult = hookResult;
|
|
}
|
|
}
|
|
}
|
|
return newResult;
|
|
};
|
|
|
|
//# sourceMappingURL=buildAfterOperation.js.map |