Updated missing rest endpoints
MODIFY
src/server/rest/v1/router/auth/AuthRouter.ts
src/server/rest/v1/router/auth/AuthRouter.ts
@@ -16,6 +16,9 @@ export default class AuthRouter {
this.buildRouteSignOn();
this.buildRouteSignOut();
this.buildRoutePasswordReset();
+ this.buildRouteVerifyMail();
+ this.buildRouteResendVerificationMail();
+ this.buildRouteCheckEndUserLicenseAgreement();
return this.router;
}
@@ -42,4 +45,22 @@ export default class AuthRouter {
await RouterUtils.handleServerAction(AuthService.handleUserPasswordReset.bind(this), ServerAction.REST_PASSWORD_RESET, req, res, next);
});
}
+
+ protected buildRouteResendVerificationMail(): void {
+ this.router.post(`/${ServerAction.REST_RESEND_VERIFICATION_EMAIL}`, async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleResendVerificationEmail.bind(this), ServerAction.REST_RESEND_VERIFICATION_EMAIL, req, res, next);
+ });
+ }
+
+ protected buildRouteVerifyMail(): void {
+ this.router.get(`/${ServerAction.REST_VERIFY_EMAIL}`, async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleVerifyEmail.bind(this), ServerAction.REST_VERIFY_EMAIL, req, res, next);
+ });
+ }
+
+ protected buildRouteCheckEndUserLicenseAgreement(): void {
+ this.router.post(`/${ServerAction.REST_CHECK_USER_LICENSE_AGREEMENT}`, async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleVerifyEmail.bind(this), ServerAction.REST_CHECK_USER_LICENSE_AGREEMENT, req, res, next);
+ });
+ }
}

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -375,6 +375,9 @@ export enum ServerAction {
REST_SIGNON = 'signon',
REST_SIGNOUT = 'signout',
REST_PASSWORD_RESET = 'passwordreset',
+ REST_VERIFY_EMAIL = 'verifyemail',
+ REST_RESEND_VERIFICATION_EMAIL = 'resendverficationmail',
+ REST_CHECK_USER_LICENSE_AGREEMENT = 'checkenduserlicenseagreement',
REST_PING = 'ping',
REST_TENANTS = 'tenants'
}

MODIFY
test/api/client/AuthenticationApi.ts
test/api/client/AuthenticationApi.ts
+import { ServerAction } from '../../../src/types/Server';
export default class AuthenticationApi {
private _baseApi: any;
@@ -23,7 +24,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'POST',
- url: '/v1/auth/signin',
+ url: '/v1/auth/' + ServerAction.REST_SIGNIN,
'axios-retry': {
retries: 0
},
@@ -42,7 +43,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'POST',
- url: '/v1/auth/signon',
+ url: '/v1/auth/' + ServerAction.REST_SIGNON,
headers: {
'Content-Type': 'application/json'
},
@@ -60,7 +61,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'POST',
- url: '/v1/auth/passwordreset',
+ url: '/v1/auth/' + ServerAction.REST_PASSWORD_RESET,
headers: {
'Content-Type': 'application/json'
},
@@ -78,7 +79,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'POST',
- url: '/client/auth/ResendVerificationEmail',
+ url: '/v1/auth/' + ServerAction.REST_RESEND_VERIFICATION_EMAIL,
headers: {
'Content-Type': 'application/json'
},
@@ -96,7 +97,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'GET',
- url: '/client/auth/VerifyEmail',
+ url: '/v1/auth/' + ServerAction.REST_VERIFY_EMAIL,
headers: {
'Content-Type': 'application/json'
},

Updated missing rest endpoints