|
|
@ -38,7 +38,7 @@ import {
|
|
|
|
import { initialDatabaseValue } from './db/example-data'
|
|
|
|
import { initialDatabaseValue } from './db/example-data'
|
|
|
|
|
|
|
|
|
|
|
|
import { validateObjectKeys } from '../shared/utils'
|
|
|
|
import { validateObjectKeys } from '../shared/utils'
|
|
|
|
import { setupOauth } from './auth'
|
|
|
|
import { setupOAuth } from './auth'
|
|
|
|
|
|
|
|
|
|
|
|
type SessionId = Opaque<string, string, 'session'>
|
|
|
|
type SessionId = Opaque<string, string, 'session'>
|
|
|
|
|
|
|
|
|
|
|
@ -78,7 +78,7 @@ export async function createApiRouter() {
|
|
|
|
|
|
|
|
|
|
|
|
const authRouter: Router = express.Router()
|
|
|
|
const authRouter: Router = express.Router()
|
|
|
|
|
|
|
|
|
|
|
|
setupOauth(authRouter, db, sessions)
|
|
|
|
setupOAuth(authRouter, db, sessions)
|
|
|
|
r.use('/auth', authRouter)
|
|
|
|
r.use('/auth', authRouter)
|
|
|
|
|
|
|
|
|
|
|
|
r.get('/api/status', (req, res) => {
|
|
|
|
r.get('/api/status', (req, res) => {
|
|
|
|