add 1 step find user
This commit is contained in:
@ -1,9 +1,13 @@
|
||||
import { findUserByEmailOrUsernameService } from "../../user/services/findUserByEmailOrUsername.service";
|
||||
import { LoginWithPasswordRequest } from "../auth.types";
|
||||
|
||||
export const loginWithPasswordService = async (
|
||||
data: LoginWithPasswordRequest
|
||||
) => {
|
||||
return `Login with password service called with data: ${JSON.stringify(
|
||||
data
|
||||
)}`;
|
||||
try {
|
||||
const userData = await findUserByEmailOrUsernameService(data.identifier);
|
||||
return userData;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user