add parameter application on api reset password
This commit is contained in:
@ -263,11 +263,18 @@ export class AuthController {
|
|||||||
required: true,
|
required: true,
|
||||||
type: 'string'
|
type: 'string'
|
||||||
}
|
}
|
||||||
|
#swagger.parameters['application'] = {
|
||||||
|
in: 'path',
|
||||||
|
description: 'Application',
|
||||||
|
required: true,
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const schema = Joi.object().keys({
|
const schema = Joi.object().keys({
|
||||||
email: Joi.string().email().required().label('Email'),
|
email: Joi.string().email().required().label('Email'),
|
||||||
|
application: Joi.string().required().label('Application'),
|
||||||
});
|
});
|
||||||
|
|
||||||
const param: User = await schema.validateAsync(req.params);
|
const param: User = await schema.validateAsync(req.params);
|
||||||
@ -327,6 +334,12 @@ export class AuthController {
|
|||||||
required: true,
|
required: true,
|
||||||
type: 'string'
|
type: 'string'
|
||||||
}
|
}
|
||||||
|
#swagger.parameters['application'] = {
|
||||||
|
in: 'path',
|
||||||
|
description: 'Application',
|
||||||
|
required: true,
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
const schema = Joi.object().keys({
|
const schema = Joi.object().keys({
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export class RoutePublic {
|
|||||||
app.use(Language.apply);
|
app.use(Language.apply);
|
||||||
|
|
||||||
app.post('/api/login', AuthController.login)
|
app.post('/api/login', AuthController.login)
|
||||||
app.put('/api/reset_password/:email', AuthController.resetPassword)
|
app.put('/api/reset_password/:email/:application', AuthController.resetPassword)
|
||||||
app.put('/api/update_password/:token', AuthController.updatePassword)
|
app.put('/api/update_password/:token', AuthController.updatePassword)
|
||||||
app.put('/api/logout/:refresh_token', AuthController.logout)
|
app.put('/api/logout/:refresh_token', AuthController.logout)
|
||||||
app.put('/api/renew_token/:refresh_token/:application', AuthController.renewToken)
|
app.put('/api/renew_token/:refresh_token/:application', AuthController.renewToken)
|
||||||
|
|||||||
Reference in New Issue
Block a user