From 7131518f3fd7c6b8148b7ecd1ab89b41e1b2cab9 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Thu, 23 Nov 2023 14:01:18 +0100 Subject: [PATCH 1/2] docs: uncomment postgres in development docker compose --- tools/compose/development.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/compose/development.yml b/tools/compose/development.yml index a1b9ff28d..23a22621d 100644 --- a/tools/compose/development.yml +++ b/tools/compose/development.yml @@ -6,22 +6,22 @@ version: "3.8" services: # Database (Postgres) - # postgres: - # image: postgres:alpine - # restart: unless-stopped - # ports: - # - ${POSTGRES_PORT:-5432}:5432 - # volumes: - # - postgres_data:/var/lib/postgresql/data - # environment: - # POSTGRES_DB: ${POSTGRES_DB:-postgres} - # POSTGRES_USER: ${POSTGRES_USER:-postgres} - # POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} - # healthcheck: - # test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-postgres}"] - # interval: 10s - # timeout: 5s - # retries: 5 + postgres: + image: postgres:alpine + restart: unless-stopped + ports: + - ${POSTGRES_PORT:-5432}:5432 + volumes: + - postgres_data:/var/lib/postgresql/data + environment: + POSTGRES_DB: ${POSTGRES_DB:-postgres} + POSTGRES_USER: ${POSTGRES_USER:-postgres} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-postgres}"] + interval: 10s + timeout: 5s + retries: 5 # Storage (for image uploads) minio: From 6e53a0f7a32f08d74e4e9eb6f901a5eee872b53f Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Thu, 23 Nov 2023 17:15:49 +0100 Subject: [PATCH 2/2] fix: auth layout if email is the only auth provider --- apps/client/src/pages/auth/layout.tsx | 8 ++++---- apps/server/src/storage/storage.service.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/client/src/pages/auth/layout.tsx b/apps/client/src/pages/auth/layout.tsx index 849382829..c5b32a92a 100644 --- a/apps/client/src/pages/auth/layout.tsx +++ b/apps/client/src/pages/auth/layout.tsx @@ -14,14 +14,14 @@ const authRoutes = [{ path: "/auth/login" }, { path: "/auth/register" }]; export const AuthLayout = () => { const location = useLocation(); - const { providers } = useAuthProviders(); - const emailAuthDisabled = !providers || !providers.includes("email"); - const isAuthRoute = useMemo(() => matchRoutes(authRoutes, location) !== null, [location]); if (!providers) return null; + // Condition (providers.length === 1) hides the divider if providers[] includes only "email" + const hideDivider = !providers.includes("email") || providers.length === 1; + return (
@@ -40,7 +40,7 @@ export const AuthLayout = () => { {isAuthRoute && ( <> -
+

{t({ diff --git a/apps/server/src/storage/storage.service.ts b/apps/server/src/storage/storage.service.ts index 1a7071bee..01ccf6f70 100644 --- a/apps/server/src/storage/storage.service.ts +++ b/apps/server/src/storage/storage.service.ts @@ -17,7 +17,7 @@ import { Config } from "../config/schema"; type ImageUploadType = "pictures" | "previews"; type DocumentUploadType = "resumes"; -type UploadType = ImageUploadType | DocumentUploadType; +export type UploadType = ImageUploadType | DocumentUploadType; const PUBLIC_ACCESS_POLICY = { Version: "2012-10-17",