2fa: fix routes to not have a slash

otherwise, it feels like it is some sort of resource
This commit is contained in:
Girish Ramakrishnan
2021-04-14 19:59:43 -07:00
parent f9a72b530c
commit 6d214cf0f2
2 changed files with 6 additions and 6 deletions

View File

@@ -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);
});
},