From 6ef87bbeaa9f239c19b9753d080aa69777c3a9b2 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 5 Jul 2022 16:20:35 -0400 Subject: [PATCH] add model references --- app/models/oauth2-authorization-code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/oauth2-authorization-code.js b/app/models/oauth2-authorization-code.js index 40708a3..2017ea7 100644 --- a/app/models/oauth2-authorization-code.js +++ b/app/models/oauth2-authorization-code.js @@ -10,9 +10,9 @@ const Schema = mongoose.Schema; const OAuth2AuthorizationCodeSchema = new Schema({ code: { type: String, required: true, index: 1 }, - clientId: { type: Schema.ObjectId, required: true, index: 1 }, + client: { type: Schema.ObjectId, required: true, index: 1, ref: 'OAuth2Client' }, redirectUri: { type: String, required: true }, - user: { type: Schema.ObjectId, required: true, index: 1 }, + user: { type: Schema.ObjectId, required: true, index: 1, ref: 'User' }, scopes: { type: [String], required: true }, });