Files
carmanagement/api/src/modules/auth/auth.account.routes.ts
T
root d7fb7b7a7b
Build & Deploy / Build & Push Docker Image (push) Failing after 47s
Build & Deploy / Deploy to VPS (push) Has been skipped
Test / API Unit Tests (push) Failing after 5m4s
Test / Marketplace Unit Tests (push) Failing after 4m55s
Test / Admin Unit Tests (push) Successful in 9m37s
Test / Dashboard Unit Tests (push) Successful in 9m37s
Test / API Integration Tests (push) Successful in 9m54s
redesign the homepage
2026-06-26 16:27:21 -04:00

25 lines
741 B
TypeScript

import { Router } from 'express'
import { parseBody } from '../../http/validate'
import { created, ok } from '../../http/respond'
import { accountStartSchema } from './auth.account.schemas'
import * as service from './auth.account.service'
const router = Router()
/**
* POST /api/v1/auth/account/start
*
* Minimal signup — Step 0 of progressive profiling.
* Creates a DRAFT company + OWNER employee and sends a verification email.
* The user must verify their email before signing in.
*/
router.post('/start', async (req, res, next) => {
try {
const body = parseBody(accountStartSchema, req)
const result = await service.startAccount(body)
created(res, result)
} catch (err) { next(err) }
})
export default router