JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
be a little less verbose with stop/start/restart
[af-coffee.git] / client.coffee
index 9765703..6a8d477 100755 (executable)
@@ -23,7 +23,7 @@ commands.app_publish = (token, app_name, zip_file, callback) ->
                (res, callback) => @api 'app_restart',      app_name, callback
        ], callback
 
-commands.app_set_state = (token, app_name, state, callback) ->
+app_set_state = (token, app_name, state, callback) ->
        async.waterfall [
                (callback) =>
                        @api 'app_info', app_name, callback
@@ -33,10 +33,10 @@ commands.app_set_state = (token, app_name, state, callback) ->
        ], callback
 
 commands.app_start = (token, app_name, callback) ->
-       @api 'app_set_state', app_name, 'STARTED', callback
+       app_set_state.call this, token, app_name, 'STARTED', callback
 
 commands.app_stop = (token, app_name, callback) ->
-       @api 'app_set_state', app_name, 'STOPPED', callback
+       app_set_state.call this, token, app_name, 'STOPPED', callback
 
 
 commands.app_restart = (token, app_name, callback) ->