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'
|
||||
|
||||
export const config = {
|
||||
runtime: 'experimental-edge'
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
interface Location extends NomadListLocation {
|
||||
@ -14,10 +14,11 @@ declare type LocationResponse = {
|
||||
next: Location
|
||||
}
|
||||
|
||||
export default async function handler() {
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
const nomadlist = await getNomadList()
|
||||
const foursquare = await getLastCheckin()
|
||||
// const foursquare = await getLastCheckin()
|
||||
const foursquare = 'disabled'
|
||||
|
||||
const response = {
|
||||
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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.5.7",
|
||||
"@vercel/node": "^3.0.3",
|
||||
"dotenv": "^16.3.1",
|
||||
"eslint": "^8.48.0",
|
||||
"node-fetch": "^3.3.2",
|
||||
"prettier": "^3.0.2",
|
||||
"typescript": "^5.2.2"
|
||||
"@types/node": "^20.11.16",
|
||||
"@vercel/node": "^3.0.17",
|
||||
"dotenv": "^16.4.1",
|
||||
"eslint": "^8.56.0",
|
||||
"prettier": "^3.2.5",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user