Skip to content
Browse files

Merge pull request #11 from mintplant/issue-320

Changed API according to issue #320 on nodester.
  • Loading branch information...
2 parents 228511d + 47ed7f1 commit 2fb6c422471725665d300e969beb30ded684d788 @nodester committed Mar 1, 2012
Showing with 6 additions and 7 deletions.
  1. +3 −4 lib/nodester.js
  2. +3 −3 src/nodester.coffee
View
7 lib/nodester.js
@@ -113,15 +113,14 @@
};
Nodester.prototype.app_create = function(name, start, cb) {
- return this.post("app", {
+ return this.post("apps", {
appname: name,
start: start
}, cb);
};
Nodester.prototype.app_running = function(name, running, cb) {
- return this.put("app", {
- appname: name,
+ return this.put("apps/" + name, {
running: running
}, cb);
};
@@ -139,7 +138,7 @@
};
Nodester.prototype.app_delete = function(name, cb) {
- return this.del("app/" + name, cb);
+ return this.del("apps/" + name, cb);
};
Nodester.prototype.app_gitreset = function(name, cb) {
View
6 src/nodester.coffee
@@ -46,14 +46,14 @@ class Nodester
user_setkey: (rsakey, cb) -> @put "user", rsakey: rsakey, cb
apps_list: (cb) -> @get "apps", cb
- app_create: (name, start, cb) -> @post "app", {appname: name, start: start}, cb
+ app_create: (name, start, cb) -> @post "apps", {appname: name, start: start}, cb
- app_running: (name, running, cb) -> @put "app", {appname: name, running: running}, cb
+ app_running: (name, running, cb) -> @put "apps/#{name}", {running: running}, cb
app_start: (name, cb) -> @app_running name, "true", cb
app_restart: (name, cb) -> @app_running name, "restart", cb
app_stop: (name, cb) -> @app_running name, "false", cb
- app_delete: (name, cb) -> @del "app/#{name}", cb
+ app_delete: (name, cb) -> @del "apps/#{name}", cb
app_gitreset: (name, cb) -> @del "gitreset/#{name}", cb
app_info: (name, cb) -> @get "app/#{name}", cb
app_logs: (name, cb) -> @get "applogs/#{name}", cb

0 comments on commit 2fb6c42

Please sign in to comment.
Something went wrong with that request. Please try again.