Refactor build-and-push.js and deploy.js to improve code structure and update version number in package.json

This commit is contained in:
Dede Fuji Abdul
2024-04-18 14:31:22 +07:00
parent fedbdfff16
commit 34e6f328b0
6 changed files with 100 additions and 53 deletions

View File

@ -5,6 +5,10 @@ const instance = axios.create({
baseURL: url
})
const ax = axios.create({
baseURL: window.location.origin
})
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')
@ -13,6 +17,7 @@ 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)
const getVersion = async () => await ax.get('/version.json')
export {
getUid,
getUp3,
@ -21,5 +26,6 @@ export {
getMedia,
getJenisTransaksi,
getUidRegional,
getRegional
getRegional,
getVersion
}