mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-04-22 10:42:10 +00:00
Removed full import on package.json
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
8405302286
commit
4da8131d11
@ -1,5 +1,5 @@
|
|||||||
import fetch from 'isomorphic-unfetch'
|
import fetch from 'isomorphic-unfetch'
|
||||||
import pkg from './package.json'
|
import { version, name } from './package.json'
|
||||||
|
|
||||||
export default class RequestWrapper {
|
export default class RequestWrapper {
|
||||||
private static cache: Array<Request<any>> = []
|
private static cache: Array<Request<any>> = []
|
||||||
@ -38,7 +38,7 @@ export class Request<T = any> {
|
|||||||
// Fetch Response
|
// Fetch Response
|
||||||
const resp = await fetch(this.url, {
|
const resp = await fetch(this.url, {
|
||||||
headers: {
|
headers: {
|
||||||
'user-agent': `${pkg.name}/${pkg.version}`
|
'user-agent': `${name}/${version}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (resp.status !== 200) {
|
if (resp.status !== 200) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user