var express = require('express');
var models = require('../models.js').models;
var collections = require('../models.js').collections;


var projectController = {};

projectController.getAllProjects = function (req, res) {
  models.Project
    .fetchAll({
      withRelated: ['user']
    })
    .then(function (coll) {
      res.send(coll.toJSON());
    })
};

projectController.get = function (req, res) {
  //dummy data, currently an array of projects as objects
  res.json([{
    name: 'doc1',
    createdAt: 'Fri, 19 Dec 2014 00:58:17 GMT'
  }, {
    name: 'doc2',
    createdAt: 'Tue, 16 Dec 2014 00:58:17 GMT'
  }, {
    name: 'doc3',
    createdAt: 'Tue, 16 Dec 2014 00:58:17 GMT'
  }, {
    name: 'doc4',
    createdAt: 'Tue, 16 Dec 2014 00:58:17 GMT'
  }]);
};

projectController.getSpecificProject = function (req, res) {

  console.log(req.params.id);
  models.Project
    .query('where', 'id', '=', req.params.id)
    .fetch({
      withRelated: ['user']
    })
    .then(function (coll) {
      // console.log('RES !!!!!!!!!!!', res);
      // console.log('COLl !!!!!!!!!!!!!!!!!!!!!', coll);
      res.send(coll);
    })
};

projectController.put = function (req, res) {
  res.status(200).end();
};

// projectController.getProject = function (req, res) {
//   //dummy data
//   res.json({
//     indexhtml: 'htmlcodehtmlcode'
//   });
// };

projectController.put = function (req, res) {
  //add users
  //add files
  //remove users
  res.status(200).end();
};

projectController.delete = function (req, res) {
  res.status(200).end();
};

module.exports = projectController;
@@ -357,418 +357,8 @@
 %7D;%0A%0A
-projectController.get = function (req, res) %7B%0A  //dummy data, currently an array of projects as objects%0A  res.json(%5B%7B%0A    name: 'doc1',%0A    createdAt: 'Fri, 19 Dec 2014 00:58:17 GMT'%0A  %7D, %7B%0A    name: 'doc2',%0A    createdAt: 'Tue, 16 Dec 2014 00:58:17 GMT'%0A  %7D, %7B%0A    name: 'doc3',%0A    createdAt: 'Tue, 16 Dec 2014 00:58:17 GMT'%0A  %7D, %7B%0A    name: 'doc4',%0A    createdAt: 'Tue, 16 Dec 2014 00:58:17 GMT'%0A  %7D%5D);%0A%7D;%0A%0A
 proj
@@ -417,39 +417,8 @@
 s) %7B
-%0A%0A  console.log(req.params.id);
 %0A  m

Fix rebase/merge mess