Unify the config routes into /api/v1/config

No more separate config routes for different types of user
This commit is contained in:
Girish Ramakrishnan
2018-06-28 17:40:57 -07:00
parent 712c920b86
commit cab9bc3a61
7 changed files with 9 additions and 150 deletions

View File

@@ -176,7 +176,7 @@ describe('Cloudron', function () {
after(cleanup);
it('cannot get without token', function (done) {
superagent.get(SERVER_URL + '/api/v1/cloudron/config')
superagent.get(SERVER_URL + '/api/v1/config')
.end(function (error, result) {
expect(result.statusCode).to.equal(401);
done();
@@ -184,7 +184,7 @@ describe('Cloudron', function () {
});
it('succeeds (admin)', function (done) {
superagent.get(SERVER_URL + '/api/v1/cloudron/config')
superagent.get(SERVER_URL + '/api/v1/config')
.query({ access_token: token })
.end(function (error, result) {
expect(result.statusCode).to.equal(200);
@@ -202,7 +202,7 @@ describe('Cloudron', function () {
});
it('fails (non-admin)', function (done) {
superagent.get(SERVER_URL + '/api/v1/cloudron/config')
superagent.get(SERVER_URL + '/api/v1/config')
.query({ access_token: token_1 })
.end(function (error, result) {
expect(result.statusCode).to.equal(403);