mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-03 12:47:44 +08:00
fix(db): fix .now variable (#2209)
This commit is contained in:
parent
6c19dad23d
commit
687f3c214d
@ -44,9 +44,6 @@ export const parseVariables = async (ctx, next) => {
|
||||
return ctx.db.getFieldByPath(`${resourceName}.${fieldPath}`);
|
||||
},
|
||||
vars: {
|
||||
$system: {
|
||||
now: new Date().toISOString(),
|
||||
},
|
||||
$date: getDateVars(),
|
||||
$user: getUser(ctx),
|
||||
},
|
||||
|
@ -267,6 +267,7 @@ const toDays = (offset: number) => {
|
||||
|
||||
export function getDateVars() {
|
||||
return {
|
||||
now: new Date().toISOString(),
|
||||
today: toUnit('day'),
|
||||
yesterday: toUnit('day', -1),
|
||||
tomorrow: toUnit('day', 1),
|
||||
|
Loading…
Reference in New Issue
Block a user