Removed full import on package.json

Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-05-31 15:59:26 +02:00
parent 8405302286
commit 4da8131d11

View File

@ -1,5 +1,5 @@
import fetch from 'isomorphic-unfetch'
import pkg from './package.json'
import { version, name } from './package.json'
export default class RequestWrapper {
private static cache: Array<Request<any>> = []
@ -38,7 +38,7 @@ export class Request<T = any> {
// Fetch Response
const resp = await fetch(this.url, {
headers: {
'user-agent': `${pkg.name}/${pkg.version}`
'user-agent': `${name}/${version}`
}
})
if (resp.status !== 200) {