mirror of
https://github.com/kremalicious/location.git
synced 2024-11-22 01:46:58 +01:00
refactor
This commit is contained in:
parent
8e4b9da112
commit
d6dc37f4f8
@ -2,7 +2,7 @@ import { getLastCheckin } from '../lib/foursquare'
|
|||||||
import { NomadListLocation, getNomadList } from '../lib/nomadlist'
|
import { NomadListLocation, getNomadList } from '../lib/nomadlist'
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
runtime: 'experimental-edge'
|
runtime: 'edge'
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Location extends NomadListLocation {
|
interface Location extends NomadListLocation {
|
||||||
@ -14,10 +14,11 @@ declare type LocationResponse = {
|
|||||||
next: Location
|
next: Location
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function handler() {
|
export async function GET(request: Request) {
|
||||||
try {
|
try {
|
||||||
const nomadlist = await getNomadList()
|
const nomadlist = await getNomadList()
|
||||||
const foursquare = await getLastCheckin()
|
// const foursquare = await getLastCheckin()
|
||||||
|
const foursquare = 'disabled'
|
||||||
|
|
||||||
const response = {
|
const response = {
|
||||||
now: { ...nomadlist.now, ...(foursquare && { lastCheckin: foursquare }) },
|
now: { ...nomadlist.now, ...(foursquare && { lastCheckin: foursquare }) },
|
||||||
|
1507
package-lock.json
generated
1507
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@ -12,13 +12,12 @@
|
|||||||
"get-checkins": "node ./scripts/get-checkins.mjs"
|
"get-checkins": "node ./scripts/get-checkins.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.5.7",
|
"@types/node": "^20.11.16",
|
||||||
"@vercel/node": "^3.0.3",
|
"@vercel/node": "^3.0.17",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.4.1",
|
||||||
"eslint": "^8.48.0",
|
"eslint": "^8.56.0",
|
||||||
"node-fetch": "^3.3.2",
|
"prettier": "^3.2.5",
|
||||||
"prettier": "^3.0.2",
|
"typescript": "^5.3.3"
|
||||||
"typescript": "^5.2.2"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user