Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make Mutexes#create and Mutexes#show return the same JSON structure a…

…s Mutexes#index - uuid and name.
  • Loading branch information...
commit 43b79935f82692c67ce39b26d112bfbe1f92345d 1 parent 2e6f7ab
@scottwb authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 resources/mutexes.js
View
13 resources/mutexes.js
@@ -45,7 +45,13 @@ _.extend(exports, {
switch (req.format) {
case 'json':
- res.json({uuid:mutex.uuid()}, 201);
+ res.json(
+ {
+ uuid : mutex.uuid(),
+ name : mutex.name()
+ },
+ 201
+ );
break;
case 'html':
@@ -77,7 +83,10 @@ _.extend(exports, {
switch (req.format) {
case 'json':
- res.json({uuid : req.mutex.uuid()});
+ res.json({
+ uuid : req.mutex.uuid(),
+ name : req.mutex.name()
+ });
break;
case 'html':
Please sign in to comment.
Something went wrong with that request. Please try again.