mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-09 17:51:47 +00:00
Implement private & public key in Project.ts model
This commit is contained in:
@ -15,6 +15,8 @@ export interface IProject {
|
||||
name: string,
|
||||
creatorId: ObjectId,
|
||||
validationKey: string,
|
||||
privateKey: string,
|
||||
publicKey: string,
|
||||
defaults: IProjectDefaults
|
||||
}
|
||||
|
||||
@ -35,6 +37,14 @@ const ProjectSchema = new Schema<IProject>({
|
||||
type: String,
|
||||
default: () => crypto.randomBytes(24).toString("hex")
|
||||
},
|
||||
privateKey: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
publicKey: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
defaults: {
|
||||
type: Object,
|
||||
default: { licenseKey: "NNUN-UUNN-UNUU-NUUN", groups: [], expirationDate: new Date(0), permissions: [], maxUses: -1 },
|
||||
|
||||
Reference in New Issue
Block a user