aboutsummaryrefslogtreecommitdiffstats
path: root/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-08-08 11:14:53 -0700
committerAdam Soltys <[email protected]>2014-08-08 11:14:53 -0700
commitf58904a6f9928685d9d33f7a8f96a5501bb5f6c2 (patch)
treec2c482b0c816dfbdf5ff67d468b1be1e46ac25f8 /app.js
parent15798a1387c202ddf14672e44435e27d2fd7f346 (diff)
downloadcoinos-server-f58904a6f9928685d9d33f7a8f96a5501bb5f6c2.tar.gz
coinos-server-f58904a6f9928685d9d33f7a8f96a5501bb5f6c2.zip
Require login for most things
Diffstat (limited to 'app.js')
-rw-r--r--app.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/app.js b/app.js
index 43270b09..6302df7a 100644
--- a/app.js
+++ b/app.js
@@ -88,25 +88,23 @@
app.get('/logout', sessions.destroy);
- app.get('/:user/exists', users.exists);
-
- app.get('/:user.json', users.json);
-
app.get('/users/new', users["new"]);
app.post('/users', users.create);
app.get('/:user/edit', authorize, users.edit);
- app.post('/:user', users.update);
+ app.post('/:user', authorize, users.update);
app.get('/:user/transactions.json', authorize, transactions.json);
- app.post('/:user/transactions', transactions.create);
+ app.post('/:user/transactions', authorize, transactions.create);
app.get('/:user/report', authorize, transactions.index);
- app.get('/:user', users.show);
+ app.get('/:user', authorize, users.show);
+
+ app.get('/:user.json', authorize, users.json);
app.use(require('connect-assets')({
src: 'public',