feat: integration api expired initiate lockey

This commit is contained in:
2022-11-15 17:47:31 +07:00
parent 657ee9931c
commit 989b78175e
2 changed files with 35 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ const url = {
findLocationByQrCode: (qrCode) => `/locations/findOne/${qrCode}`,
createOrder: () => `/bots/create-order`,
checkTransaction: (orderId) => `/bots/find/one-history/${orderId}`,
expiredOrder: (id) => `/bots/expired-status/${id}`,
}
const hooks = {
@@ -22,6 +23,14 @@ const api = {
const res = await http.fetcher(url.checkTransaction(orderId));
return res
},
async createOrder(body) {
return await http.post(url.createOrder(), body)
},
updateStatusExpiredOrder(id) {
return http.put(url.expiredOrder(id));
}
}
export const botsRepository = {