Fixed a bug in the Media & ShortenedLink model
This commit is contained in:
parent
e20bf72703
commit
b62a6d5f08
@ -13,7 +13,7 @@ export interface IMedia {
|
|||||||
const MediaSchema = new Schema<IMedia>({
|
const MediaSchema = new Schema<IMedia>({
|
||||||
assetId: {
|
assetId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: crypto.randomBytes(12).toString('hex')
|
default: () => crypto.randomBytes(12).toString('hex')
|
||||||
},
|
},
|
||||||
clientId: {
|
clientId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -12,7 +12,7 @@ export interface IShortenedLink {
|
|||||||
const ShortenedSchema = new Schema<IShortenedLink>({
|
const ShortenedSchema = new Schema<IShortenedLink>({
|
||||||
shortenedId: {
|
shortenedId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: crypto.randomBytes(3).toString('hex')
|
default: () => crypto.randomBytes(3).toString('hex')
|
||||||
},
|
},
|
||||||
originalUrl: {
|
originalUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user