Profile
Add: - Api upload background - /api-client/api-validation.ts ### No Issue
This commit is contained in:
8
service/api-client/api-validation.ts
Normal file
8
service/api-client/api-validation.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { apiConfig } from "../api-config";
|
||||
|
||||
export async function apiValidationEmail({ email }: { email: string }) {
|
||||
const response = await apiConfig.post(`/mobile/validate/email`, {
|
||||
data: email,
|
||||
});
|
||||
return response.data;
|
||||
}
|
||||
@@ -47,10 +47,11 @@ export async function uploadImageService({
|
||||
"Content-Type": "multipart/form-data",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
timeout: 30000,
|
||||
// timeout: 30000,
|
||||
});
|
||||
|
||||
const { data } = response;
|
||||
console.log("response upload >>", JSON.stringify(data, null, 2));
|
||||
|
||||
if (!data.success) {
|
||||
Toast.show({
|
||||
@@ -62,10 +63,10 @@ export async function uploadImageService({
|
||||
return;
|
||||
}
|
||||
|
||||
Toast.show({
|
||||
type: "success",
|
||||
text1: "File berhasil diunggah",
|
||||
});
|
||||
// Toast.show({
|
||||
// type: "success",
|
||||
// text1: "File berhasil diunggah",
|
||||
// });
|
||||
|
||||
return data;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user