Skip to content

Commit

Permalink
downgrade to loopback v2
Browse files Browse the repository at this point in the history
  • Loading branch information
reneolivo committed Aug 24, 2016
1 parent ec7cc66 commit 6016119
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
9 changes: 3 additions & 6 deletions common/models/professional.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
var app = require('../../server/server');

module.exports = function(Professional) {
Professional.observe('loaded', (context, next) => {
appendFutureAppointmentsCount(context).then(
() => next(),
(error) => next(error)
);
Professional.observe('loaded', (context) => {
return appendFutureAppointmentsCount(context);
});
};

function appendFutureAppointmentsCount(context) {
var professional = context.data;
var professional = context.instance;

if (!professional) return Promise.resolve();

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
"loopback-boot": "^2.6.5",
"loopback-component-explorer": "^2.4.0",
"serve-favicon": "^2.0.1",
"loopback": "^3.0.0-alpha.1"
"strong-error-handler": "^1.0.1",
"loopback-datasource-juggler": "^2.39.0",
"loopback": "^2.22.0"
},
"devDependencies": {
"eslint": "^2.5.3",
"eslint": "^2.13.1",
"eslint-config-loopback": "^4.0.0",
"nsp": "^2.1.0"
},
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions server/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"context": false,
"rest": {
"normalizeHttpPath": false,
"xml": false
Expand Down

0 comments on commit 6016119

Please sign in to comment.