fix login
deskripsi: - fix api login
This commit is contained in:
13
src/app_modules/auth/_lib/api_fetch_auth.ts
Normal file
13
src/app_modules/auth/_lib/api_fetch_auth.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export { apiFetchLogin };
|
||||
|
||||
const apiFetchLogin = async ({ nomor }: { nomor: string }) => {
|
||||
const respone = await fetch("/api/auth/login", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ nomor: nomor }),
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
|
||||
return await respone.json().catch(() => null);
|
||||
};
|
||||
Reference in New Issue
Block a user