Skip to content

Commit

Permalink
Add Edge comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ky-zo committed Aug 19, 2024
1 parent e48c9d1 commit e30fec1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/api/wordware/pair/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ export async function POST(request: Request) {
// Create a readable stream to process the response
const stream = new ReadableStream({
async start(controller) {
//Edge runtime requires to send a first chunk within the first 30 seconds. We send an empty string to keep the connection alive.
controller.enqueue(encoder.encode(''))

try {
while (true) {
const { done, value } = await reader.read()
Expand Down
2 changes: 2 additions & 0 deletions src/app/api/wordware/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export async function POST(request: Request) {
// Create a readable stream to process the response
const stream = new ReadableStream({
async start(controller) {
//Edge runtime requires to send a first chunk within the first 30 seconds. We send an empty string to keep the connection alive.
controller.enqueue(encoder.encode(''))

try {
while (true) {
const { done, value } = await reader.read()
Expand Down

0 comments on commit e30fec1

Please sign in to comment.