Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

689 B
Raw Blame
import prisma from "@/lib/db";
import type { ImportContactInfo } from "@/models/resumeImport.schema";

export async function saveContactInfoCard(
  resumeId: string,
  userId: string,
  d: ImportContactInfo,
): Promise<void> {
  await prisma.resume.update({
    where: { id: resumeId, profile: { userId } },
    data: {
      ContactInfo: {
        connectOrCreate: {
          where: { resumeId },
          create: {
            firstName: d.firstName ?? "",
            lastName: d.lastName ?? "",
            headline: d.headline ?? "",
            email: d.email ?? "",
            phone: d.phone ?? "",
            address: d.address,
          },
        },
      },
    },
  });
}