rename package to walnut@daplie.com/init

This commit is contained in:
AJ ONeal 2017-07-28 17:24:19 -06:00
parent 2ecfbc1e98
commit 4b477f562e
5 changed files with 9 additions and 7 deletions

12
lib/bootstrap.js vendored
View File

@ -162,15 +162,17 @@ module.exports.create = function (app, xconfx, models) {
// TODO How can we help apps handle this? token?
// TODO allow apps to configure trustedDomains, auth, etc
app.use('/api', cors);
app.get('/api/com.daplie.walnut.init', getConfig);
app.post('/api/com.daplie.walnut.init', setConfig);
app.get('/api/walnut@daplie.com/init', getConfig);
app.get('/api/com.daplie.walnut.init', getConfig); // deprecated
app.post('/api/walnut@daplie.com/init', setConfig);
app.post('/api/com.daplie.walnut.init', setConfig); // deprecated
// TODO use package loader
//app.use('/', express.static(path.join(__dirname, '..', '..', 'packages', 'pages', 'com.daplie.walnut.init')));
app.use('/', express.static(path.join(__dirname, 'com.daplie.walnut.init')));
//app.use('/', express.static(path.join(__dirname, '..', '..', 'packages', 'pages', 'walnut@daplie.com', 'init')));
app.use('/', express.static(path.join(__dirname, 'walnut@daplie.com', 'init')));
app.use('/', function (req, res, next) {
res.statusCode = 404;
res.end('Walnut Bootstrap Not Found. Mising com.daplie.walnut.init');
res.end('Walnut Bootstrap Not Found. Mising walnut@daplie.com/init');
});
return new PromiseA(function (_resolve) {

View File

@ -22,7 +22,7 @@ $(function () {
return $.http({
method: 'GET'
, url: baseUrl + '/api/com.daplie.walnut.init'
, url: baseUrl + '/api/walnut@daplie.com/init'
, headers: {
"Accept" : "application/json; charset=utf-8"
}
@ -83,7 +83,7 @@ $(function () {
$.http({
method: 'POST'
, url: baseUrl + '/api/com.daplie.walnut.init'
, url: baseUrl + '/api/walnut@daplie.com/init'
, headers: {
"Accept" : "application/json; charset=utf-8"
, "Content-Type": "application/json; charset=utf-8"