Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Dec 12, 2024
1 parent 640a412 commit 6a1cda5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export type AccessLogDocument = AccessLog & Document;
timestamps: { createdAt: true, updatedAt: false },
versionKey: false,
})
@Schema()
export class AccessLog {
@ApiPropertyOptional({
description: "User ID associated with the access log",
Expand Down
10 changes: 5 additions & 5 deletions src/metrics-and-logs/metrics/schemas/metrics.schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { ApiProperty } from "@nestjs/swagger";
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { Date, Document } from "mongoose";
import { MetricsRecord } from "./metrics-record.schema";

Expand All @@ -11,12 +11,12 @@ export type MetricsDocument = Metrics & Document;
versionKey: false,
})
export class Metrics {
@ApiProperty({
@ApiPropertyOptional({
description: "The date the metric was recorded",
type: String,
type: Date,
})
@Prop({ type: Date, required: false, default: Date.now })
date: Date;
@Prop({ type: Date, default: Date.now })
createdAt?: Date;

@ApiProperty({
description: "A list of endpoints with their access log compacted details",
Expand Down

0 comments on commit 6a1cda5

Please sign in to comment.