diff --git a/api/addDiaryEntry/index.ts b/api/addDiaryEntry/index.ts index e0908ed..2385158 100644 --- a/api/addDiaryEntry/index.ts +++ b/api/addDiaryEntry/index.ts @@ -4,11 +4,18 @@ const mongoose = require('mongoose'); console.log('running!'); -mongoose.connect(process.env.CONNECTION_STRING); +mongoose.connect( + process.env.CONNECTION_STRING, // Retrieve connection string + { + // boiler plate values + useNewUrlParser: true, + useUnifiedTopology: true, + } +); const entrySchema = new mongoose.Schema({ portionSize: String, - mealTypes: [String], + // mealTypes: [String], }); const EntryModel = mongoose.model('entry', entrySchema); diff --git a/src/food-log-form.ts b/src/food-log-form.ts index 8d16516..d9c18d4 100644 --- a/src/food-log-form.ts +++ b/src/food-log-form.ts @@ -38,14 +38,13 @@ class FoodLogForm extends LitElement { const portionSize = this.shadowRoot!.querySelector( 'input[type=radio]:checked' )?.value; - const mealTypes = Array.from( - this.shadowRoot!.querySelectorAll('input[type=checkbox]:checked') - ).map(e => e.value); + // const mealTypes = Array.from( + // this.shadowRoot!.querySelectorAll('input[type=checkbox]:checked') + // ).map(e => e.value); // TODO : add timestamp const meal = { portionSize, - mealTypes, }; // eslint-disable-next-line no-console