diff --git a/packages/server/src/middleware/cleanup.ts b/packages/server/src/middleware/cleanup.ts index 5204d5cfb1..d59317feed 100644 --- a/packages/server/src/middleware/cleanup.ts +++ b/packages/server/src/middleware/cleanup.ts @@ -2,7 +2,7 @@ import { Ctx } from "@budibase/types" import { context } from "@budibase/backend-core" export default async (ctx: Ctx, next: any) => { - const resp = next() + const resp = await next() const current = context.getCurrentContext() if (current?.cleanup) {