You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
520 B

import { FastifyRequest } from "fastify";
import validate from "validate.js";
import { constraints } from "@common/validation";
import Request from "./Request";
export interface ILoginFormBody {
email: string,
password: string
}
export default class LoginRequest extends Request
{
/**
* Validate the request
*/
public validate(request: FastifyRequest) {
return validate.async(request.body, {
email: constraints.login.email,
password: constraints.login.password,
},<any>{ fullMessages: false });
}
}