move various login routes under auth/

This commit is contained in:
Girish Ramakrishnan
2023-08-10 16:21:22 +05:30
parent 9ba6908764
commit 6c4aa605df
13 changed files with 162 additions and 149 deletions

View File

@@ -242,7 +242,7 @@ describe('Profile API', function () {
});
it('fails due to missing token', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/cloudron/login`)
const response = await superagent.post(`${serverUrl}/api/v1/auth/login`)
.send({ username: user.username, password: user.password })
.ok(() => true);
@@ -250,7 +250,7 @@ describe('Profile API', function () {
});
it('fails due to wrong token', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/cloudron/login`)
const response = await superagent.post(`${serverUrl}/api/v1/auth/login`)
.send({ username: user.username, password: user.password, totpToken: '12345' })
.ok(() => true);
@@ -263,7 +263,7 @@ describe('Profile API', function () {
encoding: 'base32'
});
const response = await superagent.post(`${serverUrl}/api/v1/cloudron/login`)
const response = await superagent.post(`${serverUrl}/api/v1/auth/login`)
.send({ username: user.username, password: user.password, totpToken: totpToken });
expect(response.statusCode).to.equal(200);
@@ -278,7 +278,7 @@ describe('Profile API', function () {
});
it('did disable 2fa', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/cloudron/login`)
const response = await superagent.post(`${serverUrl}/api/v1/auth/login`)
.send({ username: user.username, password: user.password });
expect(response.statusCode).to.equal(200);