Skip to content

Commit 381afd6

Browse files
author
Ryan Vogel
committed
fix(opencode): remove redundant push pair QR endpoint
1 parent a8d5b14 commit 381afd6

1 file changed

Lines changed: 0 additions & 35 deletions

File tree

packages/opencode/src/server/routes/experimental.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ async function pushPairQRCode(payload: z.infer<typeof PushPairPayload>) {
5656
return QRCode.toDataURL(pushPairLink(payload), pushPairQROptions)
5757
}
5858

59-
async function pushPairQRCodePNG(payload: z.infer<typeof PushPairPayload>) {
60-
const data = await pushPairQRCode(payload)
61-
return Buffer.from(data.replace(/^data:image\/png;base64,/, ""), "base64")
62-
}
63-
6459
const ConsoleOrgOption = z.object({
6560
accountID: z.string(),
6661
accountEmail: z.string(),
@@ -454,36 +449,6 @@ export const ExperimentalRoutes = lazy(() =>
454449
})
455450
},
456451
)
457-
.get(
458-
"/push/pair/qr",
459-
describeRoute({
460-
summary: "Get push relay pairing QR image",
461-
description: "Render the active push relay pairing QR code as a PNG image.",
462-
operationId: "experimental.push.pair.qr",
463-
responses: {
464-
200: {
465-
description: "Push relay pairing QR image",
466-
content: {
467-
"image/png": {
468-
schema: { type: "string", format: "binary" } as any,
469-
},
470-
},
471-
},
472-
404: {
473-
description: "Push relay pairing is not enabled",
474-
},
475-
},
476-
}),
477-
async (c) => {
478-
const pair = PushRelay.pair()
479-
if (!pair) {
480-
return c.text("Push pairing is not enabled", 404)
481-
}
482-
483-
c.header("Content-Type", "image/png")
484-
return c.body(await pushPairQRCodePNG(pair))
485-
},
486-
)
487452
.get(
488453
"/push",
489454
describeRoute({

0 commit comments

Comments
 (0)