diff --git a/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx b/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx index 838ef2b7c..c95ebf734 100644 --- a/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx +++ b/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx @@ -75,7 +75,7 @@ export const signInVerificationCodeHandler = createVerificationCodeHandler({ description: "Check if a sign in code is valid without using it", tags: ["OTP"], }, - codeDescription: `A 45-character verification code. For magic links, this is the code found in the "code" URL query parameter. For OTP, this is formed by concatenating the nonce (received during code creation) with the 6-digit code entered by the user`, + codeDescription: `A 45-character verification code. For magic links, this is the code found in the "code" URL query parameter. For OTP, this is formed by concatenating the 6-digit code entered by the user with the nonce (received during code creation)`, }, type: VerificationCodeType.ONE_TIME_PASSWORD, data: yupObject({}), diff --git a/apps/backend/src/app/api/latest/integrations/neon/domains/crud.tsx b/apps/backend/src/app/api/latest/integrations/neon/domains/crud.tsx index 552cb4d50..4a1235ef3 100644 --- a/apps/backend/src/app/api/latest/integrations/neon/domains/crud.tsx +++ b/apps/backend/src/app/api/latest/integrations/neon/domains/crud.tsx @@ -11,11 +11,11 @@ const domainSchema = schemaFields.urlSchema.defined() .meta({ openapiField: { description: 'URL. Must start with http:// or https://', exampleValue: 'https://example.com' } }); const domainReadSchema = yupObject({ - domain: domainSchema, + domain: domainSchema.defined(), }); const domainCreateSchema = yupObject({ - domain: domainSchema, + domain: domainSchema.defined(), }); export const domainDeleteSchema = yupMixed(); diff --git a/apps/backend/src/lib/projects.tsx b/apps/backend/src/lib/projects.tsx index fa13e9eca..d765325cb 100644 --- a/apps/backend/src/lib/projects.tsx +++ b/apps/backend/src/lib/projects.tsx @@ -154,7 +154,7 @@ export async function createOrUpdateProject( 'teams.allowClientTeamCreation': dataOptions.client_team_creation_enabled, 'teams.createPersonalTeamOnSignUp': dataOptions.create_team_on_sign_up, // ======================= domains ======================= - 'domains.allowLocalhost': dataOptions.allow_localhost, + 'domains.allowLocalhost': dataOptions.allow_localhost ?? true, 'domains.trustedDomains': dataOptions.domains ? dataOptions.domains.map((domain) => { return { baseUrl: domain.domain, diff --git a/apps/dashboard/public/logo-bright.svg b/apps/dashboard/public/logo-bright.svg index 16370cdc7..7596871fe 100644 --- a/apps/dashboard/public/logo-bright.svg +++ b/apps/dashboard/public/logo-bright.svg @@ -1,5 +1,3 @@ - - - - + + diff --git a/apps/dashboard/public/logo.svg b/apps/dashboard/public/logo.svg index 164e3e15a..ba3a16fdb 100644 --- a/apps/dashboard/public/logo.svg +++ b/apps/dashboard/public/logo.svg @@ -1,5 +1,3 @@ - - - - + + diff --git a/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/domain.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/domain.test.ts index 1c5c39afc..0c2afb6ae 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/domain.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/domain.test.ts @@ -159,3 +159,40 @@ it("adds two domains and deletes one", async ({ expect }) => { } `); }); + +it("fails when not specifying a domain", async ({ expect }) => { + await Auth.Otp.signIn(); + const { adminAccessToken } = await Project.createAndGetAdminToken(); + + const response = await niceBackendFetch("/api/v1/integrations/neon/domains", { + accessType: "admin", + headers: { + 'x-stack-admin-access-token': adminAccessToken, + }, + method: "POST", + body: {}, + }); + + expect(response).toMatchInlineSnapshot(` + NiceResponse { + "status": 400, + "body": { + "code": "SCHEMA_ERROR", + "details": { + "message": deindent\` + Request validation failed on POST /api/v1/integrations/neon/domains: + - body.domain must be defined + \`, + }, + "error": deindent\` + Request validation failed on POST /api/v1/integrations/neon/domains: + - body.domain must be defined + \`, + }, + "headers": Headers { + "x-stack-known-error": "SCHEMA_ERROR", +