Fixed a bug in the Media & ShortenedLink model

This commit is contained in:
2022-09-09 01:38:03 +02:00
parent e20bf72703
commit b62a6d5f08
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ export interface IShortenedLink {
const ShortenedSchema = new Schema<IShortenedLink>({
shortenedId: {
type: String,
default: crypto.randomBytes(3).toString('hex')
default: () => crypto.randomBytes(3).toString('hex')
},
originalUrl: {
type: String,