prisma-generator-express 1.47.0 → 1.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -461,9 +461,9 @@ export function ${routerFunctionName}<TCtx = unknown, TPrisma = any>(config: ${m
461
461
  router.delete(path, setShape(opConfig), ...before, ${modelName}Delete as RequestHandler, ...after, respond)
462
462
  }
463
463
  if (config.updateEach) {
464
- const opConfig: OperationConfigLike = (config.batch as OperationConfigLike | undefined) ?? defaultOpConfig
464
+ const opConfig: OperationConfigLike = (config.updateEach as OperationConfigLike | undefined) ?? defaultOpConfig
465
465
  const { before = [], after = [] } = opConfig
466
- const path = basePath ? \`\${basePath}/batch\` : '/batch'
466
+ const path = basePath ? \`\${basePath}/each\` : '/each'
467
467
  router.post(
468
468
  path,
469
469
  setShape(opConfig),
@@ -471,7 +471,7 @@ export function ${routerFunctionName}<TCtx = unknown, TPrisma = any>(config: ${m
471
471
  async (req: Request, res: Response, next: NextFunction) => {
472
472
  try {
473
473
  const atomic = req.get('x-batch-atomic') === 'true'
474
- readLocals(res).data = await core.batch(buildContext(req, res), atomic)
474
+ readLocals(res).data = await core.updateEach(buildContext(req, res), atomic)
475
475
  next()
476
476
  } catch (err) {
477
477
  next(mapError(err))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prisma-generator-express",
3
3
  "description": "Prisma generator for Express, Fastify, and Hono CRUD APIs with OpenAPI documentation",
4
- "version": "1.47.0",
4
+ "version": "1.48.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
@@ -477,9 +477,9 @@ export function ${routerFunctionName}<TCtx = unknown, TPrisma = any>(config: ${m
477
477
  router.delete(path, setShape(opConfig), ...before, ${modelName}Delete as RequestHandler, ...after, respond)
478
478
  }
479
479
  if (config.updateEach) {
480
- const opConfig: OperationConfigLike = (config.batch as OperationConfigLike | undefined) ?? defaultOpConfig
480
+ const opConfig: OperationConfigLike = (config.updateEach as OperationConfigLike | undefined) ?? defaultOpConfig
481
481
  const { before = [], after = [] } = opConfig
482
- const path = basePath ? \`\${basePath}/batch\` : '/batch'
482
+ const path = basePath ? \`\${basePath}/each\` : '/each'
483
483
  router.post(
484
484
  path,
485
485
  setShape(opConfig),
@@ -487,7 +487,7 @@ export function ${routerFunctionName}<TCtx = unknown, TPrisma = any>(config: ${m
487
487
  async (req: Request, res: Response, next: NextFunction) => {
488
488
  try {
489
489
  const atomic = req.get('x-batch-atomic') === 'true'
490
- readLocals(res).data = await core.batch(buildContext(req, res), atomic)
490
+ readLocals(res).data = await core.updateEach(buildContext(req, res), atomic)
491
491
  next()
492
492
  } catch (err) {
493
493
  next(mapError(err))