From 447568aa91d1025aaa07b46443b04de059d5a18e Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Fri, 26 Feb 2016 07:56:26 +0000 Subject: [PATCH] ProjectDetailsHandler.getDetails does not need full project --- .../app/coffee/Features/Project/ProjectDetailsHandler.coffee | 2 +- .../coffee/Project/ProjectDetailsHandlerTests.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/coffee/Features/Project/ProjectDetailsHandler.coffee b/services/web/app/coffee/Features/Project/ProjectDetailsHandler.coffee index a0f8cca509..bb6f6a627c 100644 --- a/services/web/app/coffee/Features/Project/ProjectDetailsHandler.coffee +++ b/services/web/app/coffee/Features/Project/ProjectDetailsHandler.coffee @@ -8,7 +8,7 @@ _ = require("underscore") module.exports = getDetails: (project_id, callback)-> - ProjectGetter.getProjectWithoutDocLines project_id, (err, project)-> + ProjectGetter.getProject project_id, {name:1, description:1, compiler:1, features:1, owner_ref:1}, (err, project)-> if err? logger.err err:err, project_id:project_id, "error getting project" return callback(err) diff --git a/services/web/test/UnitTests/coffee/Project/ProjectDetailsHandlerTests.coffee b/services/web/test/UnitTests/coffee/Project/ProjectDetailsHandlerTests.coffee index b7f0bffb10..b9e8ca27c6 100644 --- a/services/web/test/UnitTests/coffee/Project/ProjectDetailsHandlerTests.coffee +++ b/services/web/test/UnitTests/coffee/Project/ProjectDetailsHandlerTests.coffee @@ -5,7 +5,7 @@ sinon = require('sinon') assert = require("chai").assert require('chai').should() -describe 'Project details handler', -> +describe 'ProjectDetailsHandler', -> beforeEach -> @project_id = "321l3j1kjkjl" @@ -50,7 +50,7 @@ describe 'Project details handler', -> it "should return the error", (done)-> error = "some error" - @ProjectGetter.getProjectWithoutDocLines.callsArgWith(1, error) + @ProjectGetter.getProject.callsArgWith(2, error) @handler.getDetails @project_id, (err)=> err.should.equal error done()