ppob-backend/src/helper/sihemat-authorization.ts

17 lines
395 B
TypeScript

import axios from 'axios';
export const doAuthorizeHemat = async (user, pass, supplier) => {
try {
const data = {
username: `${user}`,
password: `${pass}`,
};
const res = await axios.post(`${supplier.url}/authenticate`, data);
return res.data;
} catch (err) {
console.log('errauthhemat', err)
throw err;
}
};