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

@@ -125,14 +125,14 @@ describe('Server', function () {
});
it('config fails due missing token', function (done) {
superagent.get(SERVER_URL + '/api/v1/cloudron/config', function (err, res) {
superagent.get(SERVER_URL + '/api/v1/config', function (err, res) {
expect(res.statusCode).to.equal(401);
done();
});
});
it('config fails due wrong token', function (done) {
superagent.get(SERVER_URL + '/api/v1/cloudron/config').query({ access_token: 'somewrongtoken' }).end(function (err, res) {
superagent.get(SERVER_URL + '/api/v1/config').query({ access_token: 'somewrongtoken' }).end(function (err, res) {
expect(res.statusCode).to.equal(401);
done();
});