Skip to content

Commit 7b4308c

Browse files
committed
fix(타임스탬프): 타임스탬프 람다 적용
1 parent cfc2bd2 commit 7b4308c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/entity/base-entity.schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { now, SchemaTypes, Types } from 'mongoose';
55
export class BaseSchema {
66
@Prop({ type: SchemaTypes.ObjectId })
77
_id: Types.ObjectId;
8-
@Prop({ default: now() })
8+
@Prop({ default: () => now() })
99
createdAt: Date;
1010

11-
@Prop({ default: now() })
11+
@Prop({ default: () => now() })
1212
updatedAt: Date;
1313
}

0 commit comments

Comments
 (0)