diff --git a/graphql/resolvers/books.ts b/graphql/resolvers/books.ts index 1effb4a..b908bd8 100644 --- a/graphql/resolvers/books.ts +++ b/graphql/resolvers/books.ts @@ -1,4 +1,4 @@ -import xml2js from 'xml2js' +import { parseString } from 'xml2js' import fetch from '../lib/fetchWithTimeout' // this insane bullshit is 100% goodreads fault. also what `xml2js` spits out. @@ -27,7 +27,7 @@ const getBooks = async (): Promise => { const books: Book[] = [] - xml2js.parseString(data, { normalizeTags: true }, (error, result) => { + parseString(data, { normalizeTags: true }, (error, result) => { if (error) { throw new Error(error.message) } diff --git a/graphql/resolvers/tweets.ts b/graphql/resolvers/tweets.ts index e073ed9..9db1799 100644 --- a/graphql/resolvers/tweets.ts +++ b/graphql/resolvers/tweets.ts @@ -10,7 +10,7 @@ interface Tweet { const thirtyDaysAgoTime = thirtyDaysAgo().getTime() const getTweets = async ( - tweets: Set = new Set(), + tweets: Set = new Set(), //eslint-disable-line default-param-last maxId?: number ): Promise => { let uri =