Skip to content
Snippets Groups Projects
Commit d7676b2e authored by alrwasheda's avatar alrwasheda :speech_balloon:
Browse files

create payload for jwt-token using data(email,pw,role) from DB

parent ae31dc3d
No related branches found
No related tags found
No related merge requests found
import Worker from "./models/Worker";
const getTokenPayload = async (inputEmail: string) => {
return Worker.findAll({
attributes: ["email", "password", "role"],
where: {
email: inputEmail,
},
});
};
export default getTokenPayload;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment