Skip to content

Commit

Permalink
refactor(api): delete useless validation and add a note on password c…
Browse files Browse the repository at this point in the history
…ontroller routes
  • Loading branch information
mariannebost committed Jul 8, 2024
1 parent 36997ac commit 63c0ddf
Showing 1 changed file with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Joi from 'joi';

import { passwordController } from './password.controller.js';

export const passwordRoutes = [
Expand All @@ -9,18 +7,6 @@ export const passwordRoutes = [
config: {
auth: false,
handler: (request, h) => passwordController.createResetPasswordDemand(request, h),
validate: {
payload: Joi.object({
data: {
attributes: {
email: Joi.string().email().required(),
// TODO supprimer "temporary-key" car il est généré dans le usecase associé à cette route
'temporary-key': [Joi.string(), null],
},
type: Joi.string(),
},
}),
},
notes: ['Route publique', 'Faire une demande de réinitialisation de mot de passe'],
tags: ['identity-access-management', 'api', 'password'],
},
Expand All @@ -31,6 +17,10 @@ export const passwordRoutes = [
config: {
auth: false,
handler: (request, h) => passwordController.checkResetDemand(request, h),
notes: [
'Route publique',
'Cette route permet la redirection vers le formulaire de reset de mot de passe si la demande est bien dans la liste',
],
tags: ['api', 'passwords'],
},
},
Expand Down

0 comments on commit 63c0ddf

Please sign in to comment.