@ -250,7 +250,7 @@ module.exports = function (fastify, opts, next) {
} ,
} ,
] ,
] ,
} ,
} ,
// preHandler: [validationHandler. ],
// preHandler: [validationHandler],
handler : validationHandler . resetPassword ,
handler : validationHandler . resetPassword ,
// onResponse: (request,reply) => {validationHandler.resetPassword(request,reply)}
// onResponse: (request,reply) => {validationHandler.resetPassword(request,reply)}
} ) ;
} ) ;
@ -413,9 +413,56 @@ module.exports = function (fastify, opts, next) {
handler : userController . uploadProfilePicture ,
handler : userController . uploadProfilePicture ,
} ) ;
} ) ;
fastify . route ( {
method : "DELETE" ,
url : "/api/logout" ,
schema : {
tags : [ "User" ] ,
description : "This is for logout." ,
summary : "This is for logout." ,
security : [
{
basicAuth : [ ] ,
} ,
] ,
} ,
//preHandler: validationHandler.logoutHandler,
handler : userController . logout ,
// onResponse: (request,reply) => {validationHandler.resetPassword(request,reply)}
} ) ;
fastify . route ( {
method : "POST" ,
url : "/api/sendSms" ,
schema : {
tags : [ "User" ] ,
description : "This is to send Sms." ,
summary : "This is to send Sms." ,
body : {
type : "object" ,
required : [ "mobileNumbers" ] ,
properties : {
mobileNumbers : { type : "string" } ,
} ,
} ,
security : [
{
basicAuth : [ ] ,
} ,
] ,
} ,
//preHandler: [validationHandler],
handler : userController . sendSms ,
// onResponse: (request,reply) => {validationHandler.resetPassword(request,reply)}
} ) ;
next ( ) ;
next ( ) ;
} ;
} ;