diff --git a/app/models/choice.js b/app/models/choice.js index 9454e50..b5e1dbb 100644 --- a/app/models/choice.js +++ b/app/models/choice.js @@ -3,7 +3,5 @@ import DS from "ember-data"; export default DS.Model.extend({ title: DS.attr(), description: DS.attr(), - positiveWeight: DS.attr(), - negativeWeight: DS.attr(), question: DS.belongsTo('question') }) \ No newline at end of file diff --git a/app/models/question.js b/app/models/question.js index a1ee658..5932abe 100644 --- a/app/models/question.js +++ b/app/models/question.js @@ -5,6 +5,8 @@ export default DS.Model.extend({ description: DS.attr(), explanation: DS.attr(), difficulty: DS.attr(), + positiveScore: DS.attr(), + negativeScore: DS.attr(), user: DS.belongsTo('user'), choices: DS.hasMany('choice'), tags: DS.hasMany('tag') diff --git a/app/pods/components/question-editor/template.hbs b/app/pods/components/question-editor/template.hbs index 1e67792..b188a5b 100644 --- a/app/pods/components/question-editor/template.hbs +++ b/app/pods/components/question-editor/template.hbs @@ -42,6 +42,22 @@ +
+
+ +
+
+ {{input type="number" class="input-text" value=question.positiveScore}} +
+ +
+ +
+
+ {{input type="number" class="input-text" value=question.negativeScore}} +
+
+ {{#unless question.isNew}}
diff --git a/config/environment.js b/config/environment.js index 028fd61..dd6b21b 100644 --- a/config/environment.js +++ b/config/environment.js @@ -36,9 +36,9 @@ module.exports = function(environment) { // ENV.APP.LOG_VIEW_LOOKUPS = true; ENV.ONEAUTH = { clientID: "2636937167", - callbackURL: "http://localhost:4200/callback" + callbackURL: process.env.ONEAUTH_CALLBACK_URL || "http://localhost:4200/callback" } - ENV.apiHost = 'http://localhost:8080' + ENV.apiHost = process.env.API_HOST || 'http://localhost:8080' ENV.sentry.development = true }