var app = require('../load'),
    useCases = app.useCases,
    h = require('../configHelpers');

exports.index = function(req, res){
  res.json(app.useCases);
};

exports.create = function(req, res){
  h.overwriteConfigWithPath(req.body, app.config().configPath, req.body.name + '.json');
  app.useCases.push(req.body);
  res.json(app.useCases);
};


@@ -193,16 +193,236 @@
 , res)%7B%0A
+  // TODO: do this check in ember, before hitting the route%0A  if (h.loadConfigWithPathConverted(app.config().configPath, req.body.name + '.json')) %7B%0A      res.send(409, 'Conflict: Use Case Already Exists');%0A  %7D else %7B%0A  
   h.over
@@ -502,16 +502,18 @@
 json');%0A
+  
   app.us
@@ -535,16 +535,18 @@
 .body);%0A
+  
   res.js
@@ -547,28 +547,32 @@
 res.json(app.useCases);%0A
+  %7D%0A
 %7D;%0A%0A

Return 409 if creating a use case that already exists