🎨 Updates URL handling
This commit is contained in:
parent
2d9c50fe38
commit
961c5ec44e
|
@ -156,7 +156,6 @@
|
|||
.map(this.getScorePerParty)
|
||||
.sort((a, b) => a.score - b.score)
|
||||
.reverse()
|
||||
console.log(parties)
|
||||
this.totalScoredPoints = this.scores
|
||||
.map(s => s.highestScore)
|
||||
.reduce(addUp, 0)
|
||||
|
|
1
src/config/api.js
Normal file
1
src/config/api.js
Normal file
|
@ -0,0 +1 @@
|
|||
export const IPDATA_URL = 'https://api.ipdata.co/?api-key=test'
|
|
@ -1,8 +1,9 @@
|
|||
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@/config'
|
||||
import { IPDATA_URL } from '@/config/api'
|
||||
import i18n from './index'
|
||||
|
||||
export const getCountryByIP = async () => {
|
||||
const response = await fetch('https://api.ipdata.co/?api-key=test')
|
||||
const response = await fetch(IPDATA_URL)
|
||||
return response.json()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue