upd: ganti link api
This commit is contained in:
@@ -138,11 +138,9 @@ export default function EditEventCalendar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleUpdate() {
|
async function handleUpdate() {
|
||||||
console.log('update')
|
|
||||||
try {
|
try {
|
||||||
const hasil = await decryptToken(String(token?.current))
|
const hasil = await decryptToken(String(token?.current))
|
||||||
const response = await apiUpdateCalendar({ data: { ...data, user: hasil }, id: idCalendar })
|
const response = await apiUpdateCalendar({ data: { ...data, user: hasil }, id: idCalendar })
|
||||||
console.log(response)
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
router.replace(`/division/${id}/calendar/`)
|
router.replace(`/division/${id}/calendar/`)
|
||||||
ToastAndroid.show('Berhasil mengubah acara', ToastAndroid.SHORT)
|
ToastAndroid.show('Berhasil mengubah acara', ToastAndroid.SHORT)
|
||||||
@@ -169,7 +167,6 @@ export default function EditEventCalendar() {
|
|||||||
category="update-calendar"
|
category="update-calendar"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
handleUpdate()
|
handleUpdate()
|
||||||
// console.log('klik')
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import axios from 'axios';
|
|||||||
|
|
||||||
const api = axios.create({
|
const api = axios.create({
|
||||||
// baseURL: 'http://10.0.2.2:3000/api',
|
// baseURL: 'http://10.0.2.2:3000/api',
|
||||||
// baseURL: 'https://stg-darmasaba.wibudev.com/api',
|
baseURL: 'https://stg-darmasaba.wibudev.com/api',
|
||||||
baseURL: 'http://192.168.1.126:3000/api',
|
// baseURL: 'http://192.168.1.126:3000/api',
|
||||||
});
|
});
|
||||||
|
|
||||||
export const apiCheckPhoneLogin = async (body: { phone: string }) => {
|
export const apiCheckPhoneLogin = async (body: { phone: string }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user