Skip to content

Commit

Permalink
Merge pull request #45 from ConducereIT/dev
Browse files Browse the repository at this point in the history
.
  • Loading branch information
cristim67 authored Nov 11, 2023
2 parents d35938f + efc4671 commit 1377336
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions server/emailAuthServicePostgresql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,22 +203,6 @@ export class UserServicePostgresql {
* @returns {Promise<GetToken>} Return Token for a specific email
*/

async getToken(email: string): Promise<GetToken> {
const existingUser = await UserModel.findOne({ where: { email: email } });

const id = existingUser?.userId;

const tokenUser = await ActiveSession.findOne({
where: { userId: id },
});

if (!tokenUser) {
return { status: "error", errorMessage: "ceva a mers prost" };
}

return { status: "ok", token: tokenUser.token };
}

/**
* Sends a password reset token to a user's email.
* @param {string} email - The user's email address.
Expand Down

0 comments on commit 1377336

Please sign in to comment.