Ignore:
Timestamp:
02/26/25 10:05:32 (5 weeks ago)
Author:
Naum Shapkarovski <naumshapkarovski@…>
Branches:
main
Children:
299af01
Parents:
5d6f37a
Message:

feat: implement employees

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/app/api/customers/[id]/route.ts

    r5d6f37a r057453c  
    11import { NextRequest, NextResponse } from 'next/server';
    2 import { customerSchema } from 'mvpmasters-shared';
     2import { customerSchema } from 'src/schemas';
    33import prisma from 'src/lib/prisma';
    44import { authenticateRequest } from 'src/lib/auth-middleware';
     
    1414    const validatedData = customerSchema.partial().parse(body);
    1515
    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      },
    1922    });
    2023
Note: See TracChangeset for help on using the changeset viewer.