Skip to content

Commit

Permalink
(freeCodeCamp#119-4)Instead of having the EIN field hard coded there …
Browse files Browse the repository at this point in the history
…could be a settings section for extra receipt related fields, similar to the create donation items fields and household section on the customer application
  • Loading branch information
ronaldblanco committed Oct 5, 2017
1 parent 24ad8bc commit a9fd206
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/models/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const SettingsSchema = new Schema({
trim: true
},
location: locationSchema,
receiptFields: [receiptFieldSchema],
gmapsApiKey: {
type: String,
trim: true,
Expand Down Expand Up @@ -55,5 +56,18 @@ const SettingsSchema = new Schema({
},
})

const receiptFieldSchema = new Schema({
name: {
type: String,
required: true
},
value: {
type: String,
required: true
}
}, {
_id: false
})

export default mongoose.model(modelTypes.SETTINGS, SettingsSchema)
// TODO: set location on save

0 comments on commit a9fd206

Please sign in to comment.