2fa: fix routes to not have a slash
otherwise, it feels like it is some sort of resource
This commit is contained in:
@@ -361,7 +361,7 @@ describe('Cloudron API', function () {
|
||||
});
|
||||
},
|
||||
function (callback) {
|
||||
superagent.post(`${SERVER_URL}/api/v1/profile/twofactorauthentication`).query({ access_token: accessToken }).end(function (error, result) {
|
||||
superagent.post(`${SERVER_URL}/api/v1/profile/twofactorauthentication_secret`).query({ access_token: accessToken }).end(function (error, result) {
|
||||
secret = result.body.secret;
|
||||
callback(error);
|
||||
});
|
||||
@@ -372,7 +372,7 @@ describe('Cloudron API', function () {
|
||||
encoding: 'base32'
|
||||
});
|
||||
|
||||
superagent.post(`${SERVER_URL}/api/v1/profile/twofactorauthentication/enable`).query({ access_token: accessToken }).send({ totpToken: totpToken }).end(function (error) {
|
||||
superagent.post(`${SERVER_URL}/api/v1/profile/twofactorauthentication_enable`).query({ access_token: accessToken }).send({ totpToken: totpToken }).end(function (error) {
|
||||
callback(error);
|
||||
});
|
||||
}
|
||||
@@ -382,7 +382,7 @@ describe('Cloudron API', function () {
|
||||
after(function (done) {
|
||||
async.series([
|
||||
function (callback) {
|
||||
superagent.post(`${SERVER_URL}/api/v1/profile/twofactorauthentication/disable`).query({ access_token: accessToken }).send({ password: PASSWORD }).end(function (error) {
|
||||
superagent.post(`${SERVER_URL}/api/v1/profile/twofactorauthentication_disable`).query({ access_token: accessToken }).send({ password: PASSWORD }).end(function (error) {
|
||||
callback(error);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user