File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/content/docs/workflows/build Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ export default {
297297 async fetch(req : Request , env : Env ): Promise <Response > {
298298 // 🔴 Bad: Use an ID that isn't unique across future Workflow invocations
299299 let userId = getUserId (req ) // Returns the userId
300- let instance = await env .MY_WORKFLOW .create ({
300+ let badInstance = await env .MY_WORKFLOW .create ({
301301 id: userId ,
302302 params: payload
303303 });
@@ -308,14 +308,14 @@ export default {
308308 // so that you can track all instances associated with a specific user or merchant.
309309 instanceId = ` ${getUserId (request )}-${await crypto .randomUUID ().slice (0 , 6 )} `
310310 let { result } = await addNewInstanceToDB (userId , instanceId )
311- let instance = await env .MY_WORKFLOW .create ({
311+ let goodInstance = await env .MY_WORKFLOW .create ({
312312 id: userId ,
313313 params: payload
314314 });
315315
316316 return Response .json ({
317- id: instance .id ,
318- details: await instance .status (),
317+ id: badInstance .id ,
318+ details: await badInstance .status (),
319319 });
320320 },
321321};
You can’t perform that action at this time.
0 commit comments