diff --git a/src/api/db/schemas/Image.js b/src/api/db/schemas/Image.js index d2126935..ebef0c74 100644 --- a/src/api/db/schemas/Image.js +++ b/src/api/db/schemas/Image.js @@ -4,7 +4,6 @@ import { LocationSchema, ObjectSchema } from './shared/index.js'; -import { randomUUID } from 'node:crypto'; const Schema = mongoose.Schema; @@ -15,7 +14,7 @@ const Schema = mongoose.Schema; */ const ImageCommentSchema = new Schema({ - _id: { type: String, required: true, default: randomUUID }, + _id: { type: String, required: true, default: Schema.Types.ObjectId, }, author: { type: String, required: true }, created: { type: Date, default: Date.now, required: true }, comment: { type: String, required: true }