Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed app delete

  • Loading branch information...
commit b94338c171476444f70c49fcf5ce994e6d831d4d 1 parent d67d9b5
Chris Matthieu chrismatthieu authored

Showing 2 changed files with 7 additions and 6 deletions. Show diff stats Hide diff stats

  1. +5 5 app.js
  2. +2 1  lib/app.js
10 app.js
@@ -94,7 +94,7 @@ myapp.put('/user', middle.authenticate, user.put);
94 94
95 95 // Delete your user account
96 96 // curl -X DELETE -u "testuser:123" http://localhost:4001/user
97   -myapp.delete('/user', middle.authenticate, user.delete);
  97 +myapp.del('/user', middle.authenticate, user.delete);
98 98
99 99 // All Applications info
100 100 // http://chris:123@localhost:4001/apps
@@ -132,10 +132,10 @@ myapp.put('/app', middle.authenticate, middle.authenticate_app, app.put);
132 132
133 133 // Delete your nodejs app
134 134 // curl -X DELETE -u "testuser:123" -d "appname=test" http://localhost:4001/apps
135   -myapp.delete('/app', middle.authenticate, middle.authenticate_app, app.delete);
  135 +myapp.del('/app', middle.authenticate, middle.authenticate_app, app.delete);
136 136
137 137
138   -myapp.delete('/gitreset', middle.authenticate, middle.authenticate_app, app.gitreset);
  138 +myapp.del('/gitreset', middle.authenticate, middle.authenticate_app, app.gitreset);
139 139
140 140 // curl -u "testuser:123" -d "appname=test" http://localhost:4001/applogs
141 141 myapp.get('/applogs/:appname', middle.authenticate, middle.authenticate_app, app.logs);
@@ -150,7 +150,7 @@ myapp.get('/applogs/:appname', middle.authenticate, middle.authenticate_app, app
150 150 // curl -u DELETE -u "testuser:123" -d "appname=test&key=NODE_ENV" http://localhost:4001/env
151 151 myapp.get('/env/:appname', middle.authenticate, middle.authenticate_app, app.env_get);
152 152 myapp.put('/env', middle.authenticate, middle.authenticate_app, app.env_put);
153   -myapp.delete('/env', middle.authenticate, middle.authenticate_app, app.env_delete);
  153 +myapp.del('/env', middle.authenticate, middle.authenticate_app, app.env_delete);
154 154
155 155 // APP NPM Handlers
156 156 var npm = require('./lib/npm');
@@ -164,7 +164,7 @@ myapp.post('/npm', middle.authenticate, middle.authenticate_app, npm.post);
164 164 // curl -X DELETE -u "testuser:123" -d "appname=test&domain=<domainname>" http://localhost:4001/appdomains
165 165 var domains = require('./lib/domains');
166 166 myapp.post('/appdomains', middle.authenticate, middle.authenticate_app, domains.post);
167   -myapp.delete('/appdomains', middle.authenticate, middle.authenticate_app, domains.delete);
  167 +myapp.del('/appdomains', middle.authenticate, middle.authenticate_app, domains.delete);
168 168 myapp.get('/appdomains', middle.authenticate, domains.get);
169 169
170 170 // curl -X POST -d "user=username" http://localhost:4001/reset_password
3  lib/app.js
... ... @@ -1,4 +1,5 @@
1 1 var config = require('../config'),
  2 + request = require('request'),
2 3 fs = require('fs'),
3 4 path = require('path'),
4 5 cradle = require('cradle'),
@@ -92,7 +93,7 @@ module.exports = {
92 93 });
93 94 },
94 95 delete: function (req, res, next) {
95   - var appname = req.param("appname") //.toLowerCase();
  96 + var appname = req.param("appname").toLowerCase();
96 97 // var appname = req.body.appname.toLowerCase();
97 98 var user = req.user;
98 99 var app = req.app;

0 comments on commit b94338c

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