Skip to content

Commit

Permalink
Aftral[premieroctet#90]: fixed declaration for resources in userschema
Browse files Browse the repository at this point in the history
  • Loading branch information
SeghirOumo committed Aug 9, 2024
1 parent ee7aff6 commit 1236b5a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions backend/web/server/plugins/aftral-lms/schemas/UserSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ const UserSchema = new Schema({
ref: 'program',
required: false,
},
resources: [{
type: Schema.Types.ObjectId,
ref: 'resource',
required: false
}],
resources: {
type: [{
type: Schema.Types.ObjectId,
ref: 'resource',
}],
required: true,
default: [],
},
}, schemaOptions)

/* eslint-disable prefer-arrow-callback */
Expand Down

0 comments on commit 1236b5a

Please sign in to comment.