fix async

This commit is contained in:
Yath Seanghay 2021-04-05 12:22:14 +07:00
parent 23b96fbad4
commit c6ac497af2

View File

@ -1,6 +1,6 @@
const axios = require('axios') const axios = require('axios')
module.exports = (req, res) => { module.exports = async (req, res) => {
const { method, body, url } = req.body; const { method, body, url } = req.body;
if (method == 'GET') { if (method == 'GET') {
const { data } = await axios.get(url); const { data } = await axios.get(url);