fix(routes/api): upgrade handlers to fit new fresh api

This commit is contained in:
Julien Oculi 2025-06-23 11:52:25 +02:00
parent 4fc24173ae
commit a0b3a97ec6
4 changed files with 5 additions and 4 deletions

View file

@ -5,7 +5,7 @@ import { SessionHandlers } from ':src/session/mod.ts'
import { respondApi, respondApiStream } from ':src/utils.ts'
export const handler: SessionHandlers = {
GET(_req, ctx) {
GET(ctx) {
try {
const memberList = dbToMemberCardProps(db)

View file

@ -27,7 +27,8 @@ export type WebAuthnLoginStartPayload = {
export type WebAuthnLoginFinishPayload = AuthenticationResponseJSON
export const handler: SessionHandlers = {
async POST(req, ctx) {
async POST(ctx) {
const req = ctx.req
const relyingParty = getRelyingParty(ctx.url)
const { step } = ctx.params as Params

View file

@ -27,7 +27,8 @@ export type WebAuthnRegisterStartPayload = { name: string }
export type WebAuthnRegisterFinishPayload = RegistrationResponseJSON
export const handler: SessionHandlers = {
async POST(req, ctx) {
async POST(ctx) {
const req = ctx.req
const relyingParty = getRelyingParty(ctx.url)
const { step } = ctx.params as Params

View file

@ -4,7 +4,6 @@ import { define } from '../../../utils.ts'
export const handler = define.handlers({
GET() {
console.log('VAPID', publicKey)
return respondApi('success', publicKey)
},
})