Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
feat: dependency updates and using axios
Browse files Browse the repository at this point in the history
Moving from sync-request to axios with async await.
  • Loading branch information
helio-frota committed Aug 6, 2021
1 parent 7f74403 commit 041af5f
Show file tree
Hide file tree
Showing 3 changed files with 1,969 additions and 13,290 deletions.
6 changes: 3 additions & 3 deletions lib/utils/url-fetcher.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

const syncRequest = require('sync-request');
const axios = require('axios');

const fetch = (url) => {
const res = syncRequest('GET', url);
const fetch = async (url) => {
const res = await axios.get(url);
if (res.statusCode === 200) {
return JSON.parse(res.body.toString());
} else {
Expand Down
Loading

0 comments on commit 041af5f

Please sign in to comment.