From b3e34d7f9262fa2a3799d109cbaaa138c1babb9b Mon Sep 17 00:00:00 2001 From: Junyi Date: Wed, 19 Jul 2023 09:16:03 +0700 Subject: [PATCH] fix(middleware): revert now variable back (#2267) --- packages/core/server/src/middlewares/parse-variables.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/server/src/middlewares/parse-variables.ts b/packages/core/server/src/middlewares/parse-variables.ts index 9dc8a1839..6e4cd323b 100644 --- a/packages/core/server/src/middlewares/parse-variables.ts +++ b/packages/core/server/src/middlewares/parse-variables.ts @@ -44,6 +44,9 @@ export const parseVariables = async (ctx, next) => { return ctx.db.getFieldByPath(`${resourceName}.${fieldPath}`); }, vars: { + $system: { + now: new Date().toISOString(), + }, $date: getDateVars(), $user: getUser(ctx), },