Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.organizeImports": "never",
"source.fixAll.eslint": "always"
},
"editor.formatOnSave": true
}
12 changes: 6 additions & 6 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import cors from "cors";
import express from "express";
import helmet from "helmet";

import { env } from "./config/env.schema.ts";
import { db } from "./db/index.ts";
import { userTable } from "./db/schema/auth/auth.schema.ts";
import { auth } from "./lib/auth/auth.ts";
import { env } from "./lib/validation/env.schema.ts";
import { errorHandler } from "./middlewares/error-handler.middleware.ts";
import authRouter from "./routes/auth.routes.ts";
import healthRouter from "./routes/health.routes.ts";
import onboardingRouter from "./routes/onboarding.routes.ts";
import authRouter from "./modules/auth/auth.routes.ts";
import healthRouter from "./modules/health/health.routes.ts";
import onboardingRouter from "./modules/onboarding/onboarding.routes.ts";
import { auth } from "./shared/auth/auth.ts";
import { errorHandler } from "./shared/middlewares/error-handler.middleware.ts";

const app = express();

Expand Down
File renamed without changes.
301 changes: 0 additions & 301 deletions src/controllers/onboarding.controller.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/db/create-user-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { sql } from "drizzle-orm";

import { db } from "./index.js";

type TransactionType = Parameters<Parameters<typeof db.transaction>[0]>[0];
export type TransactionType = Parameters<Parameters<typeof db.transaction>[0]>[0];

export const createUserContext = (userId: string) => {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/db/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";

import { env } from "../lib/validation/env.schema.ts";
import { env } from "../config/env.schema.ts";
import * as schema from "./schema/index.ts";

const client = postgres(env.DATABASE_APP_USER_URL, {
Expand Down
2 changes: 1 addition & 1 deletion src/db/schema/app/candidate-profile.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { relations, sql } from "drizzle-orm";
import { integer, pgPolicy, pgTable, text, timestamp } from "drizzle-orm/pg-core";

import { userTable } from "../auth/auth.schema.ts";
import { candidateProfileTagTable } from "./candidate_profile_tag.schema.ts";
import { candidateProfileTagTable } from "./candidate-profile-tag.schema.ts";

export const candidateProfileTable = pgTable(
"candidate_profile",
Expand Down
7 changes: 5 additions & 2 deletions src/db/schema/app/onboarding.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
timestamp,
} from "drizzle-orm/pg-core";

import type { CandidateOnboardingDraftData } from "../../../lib/validation/candidate-onboarding.schema.ts";
import type { CandidateOnboardingDraftData } from "../../../modules/onboarding/candidate-onboarding.schema.ts";
import type { RecruiterOnboardingDraftData } from "../../../modules/onboarding/recruiter-onboarding.schema.ts";
import { userTable } from "../auth/auth.schema.ts";

export const userOnboardingTable = pgTable(
Expand All @@ -23,7 +24,9 @@ export const userOnboardingTable = pgTable(

isCompleted: boolean("is_completed").default(false).notNull(),
currentStep: integer("current_step").default(1).notNull(),
draft: jsonb("draft").$type<CandidateOnboardingDraftData | null>(),
draft: jsonb("draft").$type<
CandidateOnboardingDraftData | RecruiterOnboardingDraftData | null
>(),

createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(),
updatedAt: timestamp("updated_at", { withTimezone: true })
Expand Down
2 changes: 1 addition & 1 deletion src/db/schema/app/recruiter-profile.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { relations, sql } from "drizzle-orm";
import { pgPolicy, pgTable, text, timestamp } from "drizzle-orm/pg-core";

import { userTable } from "../auth/auth.schema.ts";
import { recruiterProfileTagTable } from "./recruiter_profile_tag.schema.ts";
import { recruiterProfileTagTable } from "./recruiter-profile-tag.schema.ts";

export const recruiterProfileTable = pgTable(
"recruiter_profile",
Expand Down
Loading