@@ -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 ( / ^ d a t a : i m a g e \/ p n g ; b a s e 6 4 , / , "" ) , "base64" )
62- }
63-
6459const 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