Function: createCandidate()
createCandidate(
_prev,formData):Promise<CandidateCreatedState>
Defined in: src/server/actions/recruiting.ts:103
Create a candidate, or return the existing one with the same normalized email (DOM-1 / PRV-4). The DB has a partial unique index on (company_id, lower(email)); without this find-first the manual add path would hard-fail with a raw 23505 on a re-add. Null-email candidates are always inserted.
Parameters
_prev
formData
FormData
Returns
Promise<CandidateCreatedState>