upd: profile

Deskripsi:
- percobaan fetch profile menggunakan redux
- install package redux

No Issues
This commit is contained in:
amel
2025-04-17 17:29:17 +08:00
parent 043d15bdd9
commit fcad450649
8 changed files with 89 additions and 67 deletions

View File

@@ -9,16 +9,16 @@ export const apiCheckPhoneLogin = async (body: { phone: string }) => {
return response.data;
}
export const apiSendOtp = async (body: { phone: string, otp:number }) => {
export const apiSendOtp = async (body: { phone: string, otp: number }) => {
const res = await axios.get(`https://wa.wibudev.com/code?nom=${body.phone}&text=*DARMASABA*%0A%0A
JANGAN BERIKAN KODE RAHASIA ini kepada siapa pun TERMASUK PIHAK DARMASABA. Masukkan otentikasi: *${encodeURIComponent(body.otp)}*`)
return res.status
}
// export const getEntities = async () => {
// const response = await axios.get('https://stg-darmasaba.wibudev.com/api/version-app');
// return response.data;
// };
export const apiGetProfile = async ({ id }: { id: string }) => {
const response = await api.get(`/user/${id}`);
return response.data;
};
// export const createEntity = async (newEntity: any) => {
// const response = await api.post('/entities', newEntity);