This commit is contained in:
Matthias Kretschmann 2024-02-04 22:03:22 +00:00
parent 8e4b9da112
commit d6dc37f4f8
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 1157 additions and 370 deletions

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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",