@ha_tecno/react-native-sdk
Version:
React Native SDK for biometric authentication, liveness detection, and fingerprint recognition
27 lines (26 loc) • 716 B
JavaScript
;
import { api } from "../http/api.js";
export const userService = {
validCpf: cpf => api.post('/validcpf', {
cpf
}).catch(error => ({
status: error?.status || 400,
message: error?.message || 'CPF inválido ou não cadastrado'
})),
login: (cpf, password) => api.post('/login', {
cpf,
senha: password
}).catch(error => ({
status: error?.status || 400,
message: error?.message || 'CPF ou senha inválidos'
})),
register: (cpf, name, password) => api.post('/signup', {
cpf,
name,
senha: password
}).catch(error => ({
status: error?.status || 400,
message: error?.message || 'Erro ao cadastrar'
}))
};
//# sourceMappingURL=userService.js.map