replace uuid pkg

This commit is contained in:
Thomas Ruoff
2025-03-30 22:11:38 +02:00
parent 7c0c891efc
commit 8e65500875
3 changed files with 3 additions and 19 deletions

View File

@@ -1,5 +1,4 @@
import * as mongoose from 'mongoose'
import { v4 as uuidv4 } from 'uuid'
import {
dateFormatBackend,
getDays,
@@ -42,7 +41,7 @@ const BookingSchema = new mongoose.Schema(
// need a seperate uuid to be able to target a booking anonimously
uuid: {
type: String,
default: uuidv4,
default: () => crypto.randomUUID(),
index: true,
},
name: { type: String, required: true },

16
package-lock.json generated
View File

@@ -27,8 +27,7 @@
"nodemailer": "^6.10.0",
"react": "19.1.0",
"react-calendar": "5.1.0",
"react-dom": "19.1.0",
"uuid": "10.0.0"
"react-dom": "19.1.0"
},
"devDependencies": {
"@types/nodemailer": "^6.4.17",
@@ -14586,19 +14585,6 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
"node_modules/uuid": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
"integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/v8-to-istanbul": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz",

View File

@@ -30,8 +30,7 @@
"nodemailer": "^6.10.0",
"react": "19.1.0",
"react-calendar": "5.1.0",
"react-dom": "19.1.0",
"uuid": "10.0.0"
"react-dom": "19.1.0"
},
"devDependencies": {
"@types/nodemailer": "^6.4.17",