Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Commit

Permalink
fix(user model): set empty orgs array by default
Browse files Browse the repository at this point in the history
  • Loading branch information
VChet committed Nov 22, 2020
1 parent 8fffddf commit 28a1032
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ const schema = new Schema({
required: true,
unique: true
},
orgs: [{
login: String,
id: Number
}]
orgs: {
type: [{
login: String,
id: Number
}],
default: []
}
});

async function getOrganizations(username) {
Expand Down

0 comments on commit 28a1032

Please sign in to comment.