change file name and directory network.ts n graphql
This commit is contained in:
25
src/utils/api/api.rest.ts
Executable file
25
src/utils/api/api.rest.ts
Executable file
@ -0,0 +1,25 @@
|
||||
import axios from 'axios'
|
||||
|
||||
const url = import.meta.env.VITE_APP_REST_ENDPOINT
|
||||
const instance = axios.create({
|
||||
baseURL: url
|
||||
})
|
||||
|
||||
const getUid = async () => await instance.get('/uid')
|
||||
const getUidRegional = async (regional: number) => await instance.get('/uid?regional=' + regional)
|
||||
const getRegional = async () => await instance.get('/regional')
|
||||
const getMedia = async () => await instance.get('/media')
|
||||
const getJenisTransaksi = async () => await instance.get('/jenisTransaksi')
|
||||
const getUp3 = async (uid: number) => await instance.get('/up3?uid=' + uid)
|
||||
const getUlp = async (up3: number) => await instance.get('/ulp?up3=' + up3)
|
||||
const getPosko = async (uppp: number) => await instance.get('/posko?up3=' + uppp)
|
||||
export {
|
||||
getUid,
|
||||
getUp3,
|
||||
getPosko,
|
||||
getUlp,
|
||||
getMedia,
|
||||
getJenisTransaksi,
|
||||
getUidRegional,
|
||||
getRegional
|
||||
}
|
Reference in New Issue
Block a user