diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-13 13:51:02 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-13 13:51:02 -0400 |
| commit | ebb17679c64723dc1378079f9da0697673b21f5d (patch) | |
| tree | 3a651d51e9f19c6d7ae2c090533ef31ed3879351 | |
| parent | 443237393f34532c205cfd4e0d566c90ff4436d7 (diff) | |
Namespace special admin endpoints
| -rw-r--r-- | app/node_modules/okadminview/index.js | 4 | ||||
| -rw-r--r-- | themes/okadmin/templates/index.liquid | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/node_modules/okadminview/index.js b/app/node_modules/okadminview/index.js index 648487c..161a195 100644 --- a/app/node_modules/okadminview/index.js +++ b/app/node_modules/okadminview/index.js @@ -129,7 +129,7 @@ function OKAdminView(options) { }).fail(error(req, res, 500)); }); - router.get('/:type/new/', function createResourceView(req, res, next) { + router.get('/:type/__new__/', function createResourceView(req, res, next) { var type = req.params.type || ''; var resource = resourceCache.get(type); if (!resource) { @@ -194,7 +194,7 @@ function OKAdminView(options) { } }); - router.put('/:type/__batch/', function putBatch(req, res, next) { + router.put('/:type/__batch__/', function putBatch(req, res, next) { var type = req.params.type; var body = req.body || {}; var resourcesJSON = body[type]; diff --git a/themes/okadmin/templates/index.liquid b/themes/okadmin/templates/index.liquid index 10903b9..330ed89 100644 --- a/themes/okadmin/templates/index.liquid +++ b/themes/okadmin/templates/index.liquid @@ -8,7 +8,7 @@ {% assign resource = pair[1] %} <section class="resource-category {{name}}"> - <form action="{{resource.type}}/__batch/" method="POST"> + <form action="{{resource.type}}/__batch__/" method="POST"> <header> <h2>{{name | capitalize}}</h2> </header> @@ -27,7 +27,7 @@ <button type="submit" class="btn save-btn" href="#">save</button> <a class="btn edit-btn active" href="#">sort</a> - <a class="btn add-btn active" href="{{resource.type}}/new/">+</a> + <a class="btn add-btn active" href="{{resource.type}}/__new__/">+</a> </nav> </footer> </form> |
