move various login routes under auth/
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user