Changeset 057453c for src/app/api/customers/[id]/route.ts
- Timestamp:
- 02/26/25 10:05:32 (5 weeks ago)
- Branches:
- main
- Children:
- 299af01
- Parents:
- 5d6f37a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/app/api/customers/[id]/route.ts
r5d6f37a r057453c 1 1 import { NextRequest, NextResponse } from 'next/server'; 2 import { customerSchema } from ' mvpmasters-shared';2 import { customerSchema } from 'src/schemas'; 3 3 import prisma from 'src/lib/prisma'; 4 4 import { authenticateRequest } from 'src/lib/auth-middleware'; … … 14 14 const validatedData = customerSchema.partial().parse(body); 15 15 16 const customer = await prisma.customer.update({ 17 where: { id: params.id, userId }, 18 data: validatedData, 16 const customer = await prisma.client.update({ 17 where: { id: params.id }, 18 data: { 19 ...validatedData, 20 bankAccounts: undefined, 21 }, 19 22 }); 20 23
Note:
See TracChangeset
for help on using the changeset viewer.