Skip to content

Commit

Permalink
Switch to ObjectId
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Dec 19, 2023
1 parent 4951d20 commit 6ae9eb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/api/db/schemas/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
LocationSchema,
ObjectSchema
} from './shared/index.js';
import { randomUUID } from 'node:crypto';

const Schema = mongoose.Schema;

Expand All @@ -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 }
Expand Down

0 comments on commit 6ae9eb3

Please sign in to comment.