diff --git a/package.json b/package.json index 2675c1e..a7f1a06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unitiweb-express-microservice", - "version": "0.2.6", + "version": "0.2.7", "description": "A simple microservice framework using express", "main": "src/index.js", "scripts": { diff --git a/src/context.js b/src/context.js index e0da0c6..1221eee 100644 --- a/src/context.js +++ b/src/context.js @@ -10,12 +10,8 @@ class Context { this.list.push({ name, module }) } - get (name) { - const ctx = this.list.find(ctx => ctx.name === name) - if (!ctx) { - throw new Error('Tried to get context item that doesn\'t exists') - } - return ctx + deconstruct () { + return this.build() } build () {