Renamed REST actions
MODIFY
src/server/rest/v1/router/auth/AuthRouter.ts
src/server/rest/v1/router/auth/AuthRouter.ts
@@ -43,32 +43,32 @@ export default class AuthRouter {
}
protected buildRoutePasswordReset(): void {
- this.router.post(`/${ServerAction.REST_PASSWORD}/reset`, async (req: Request, res: Response, next: NextFunction) => {
- await RouterUtils.handleServerAction(AuthService.handleUserPasswordReset.bind(this), ServerAction.REST_PASSWORD, req, res, next);
+ this.router.post(`/password/${ServerAction.REST_RESET}`, async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleUserPasswordReset.bind(this), ServerAction.REST_RESET, req, res, next);
});
}
protected buildRouteResendVerificationMail(): void {
- this.router.post(`/${ServerAction.REST_MAIL}/resend`, async (req: Request, res: Response, next: NextFunction) => {
- await RouterUtils.handleServerAction(AuthService.handleResendVerificationEmail.bind(this), ServerAction.REST_MAIL, req, res, next);
+ this.router.post(`/mail/${ServerAction.REST_RESEND}`, async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleResendVerificationEmail.bind(this), ServerAction.REST_RESEND, req, res, next);
});
}
protected buildRouteVerifyMail(): void {
- this.router.get(`/${ServerAction.REST_MAIL}/check`, async (req: Request, res: Response, next: NextFunction) => {
- await RouterUtils.handleServerAction(AuthService.handleVerifyEmail.bind(this), ServerAction.REST_MAIL, req, res, next);
+ this.router.get(`/mail/${ServerAction.REST_CHECK}`, async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleVerifyEmail.bind(this), ServerAction.REST_CHECK, req, res, next);
});
}
protected buildRouteEndUserLicenseAgreement(): void {
- this.router.get(`/${ServerAction.REST_EULA}`, async (req: Request, res: Response, next: NextFunction) => {
- await RouterUtils.handleServerAction(AuthService.handleGetEndUserLicenseAgreement.bind(this), ServerAction.REST_EULA, req, res, next);
+ this.router.get('/eula', async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleGetEndUserLicenseAgreement.bind(this), ServerAction.END_USER_LICENSE_AGREEMENT, req, res, next);
});
}
protected buildRouteCheckEndUserLicenseAgreement(): void {
- this.router.get(`/${ServerAction.REST_EULA}/check`, async (req: Request, res: Response, next: NextFunction) => {
- await RouterUtils.handleServerAction(AuthService.handleCheckEndUserLicenseAgreement.bind(this), ServerAction.REST_EULA, req, res, next);
+ this.router.get(`/eula/${ServerAction.REST_CHECK}`, async (req: Request, res: Response, next: NextFunction) => {
+ await RouterUtils.handleServerAction(AuthService.handleCheckEndUserLicenseAgreement.bind(this), ServerAction.REST_CHECK, req, res, next);
});
}
}

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -374,9 +374,9 @@ export enum ServerAction {
REST_SIGNIN = 'signin',
REST_SIGNON = 'signon',
REST_SIGNOUT = 'signout',
- REST_PASSWORD = 'password',
- REST_MAIL = 'mail',
- REST_EULA = 'eula',
+ REST_CHECK = 'check',
+ REST_RESEND = 'resend',
+ REST_RESET = 'reset',
REST_PING = 'ping',
REST_TENANTS = 'tenants'
}

MODIFY
test/api/client/AuthenticationApi.ts
test/api/client/AuthenticationApi.ts
@@ -61,7 +61,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'POST',
- url: '/v1/auth/' + ServerAction.REST_PASSWORD + '/reset',
+ url: '/v1/auth/password/' + ServerAction.REST_RESET,
headers: {
'Content-Type': 'application/json'
},
@@ -79,7 +79,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'POST',
- url: '/v1/auth/' + ServerAction.REST_MAIL + '/resend',
+ url: '/v1/auth/mail/' + ServerAction.REST_RESEND,
headers: {
'Content-Type': 'application/json'
},
@@ -97,7 +97,7 @@ export default class AuthenticationApi {
// Send
const response = await this._baseApi.send({
method: 'GET',
- url: '/v1/auth/' + ServerAction.REST_MAIL + '/check',
+ url: '/v1/auth/mail/' + ServerAction.REST_CHECK,
headers: {
'Content-Type': 'application/json'
},

Renamed REST actions