fix api url mismatch

This commit is contained in:
mengstabketemaw
2026-06-02 09:23:01 +03:00
parent 8e86f74be6
commit e735ba4fca
3 changed files with 34 additions and 12 deletions

View File

@@ -17,11 +17,11 @@ import { notify } from '@ema-platform/ui';
const BASE_API_URL = const BASE_API_URL =
(import.meta as { env?: Record<string, string> }).env?.['VITE_BASE_API_URL'] ?? (import.meta as { env?: Record<string, string> }).env?.['VITE_BASE_API_URL'] ??
'http://localhost:3000'; 'http://localhost:3001/api';
const schema = z.object({ const schema = z.object({
email: z.string().email('Enter a valid email'), email: z.string().email('Enter a valid email'),
password: z.string().min(6, 'Password must be at least 6 characters'), password: z.string().min(0, 'Password must be at least 6 characters'),
}); });
type FormValues = z.infer<typeof schema>; type FormValues = z.infer<typeof schema>;

View File

@@ -3,7 +3,7 @@ import { resolveSessionContext } from '../session';
const BASE_API_URL = const BASE_API_URL =
(import.meta as { env?: Record<string, string> }).env?.['VITE_BASE_API_URL'] ?? (import.meta as { env?: Record<string, string> }).env?.['VITE_BASE_API_URL'] ??
'http://localhost:3000'; 'http://localhost:3001';
export const baseApi = createApi({ export const baseApi = createApi({
reducerPath: 'baseApi', reducerPath: 'baseApi',

40
nx.json
View File

@@ -2,8 +2,14 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json", "$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "main", "defaultBase": "main",
"namedInputs": { "namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"], "default": [
"sharedGlobals": ["{workspaceRoot}/nx.json", "{workspaceRoot}/tsconfig.base.json"], "{projectRoot}/**/*",
"sharedGlobals"
],
"sharedGlobals": [
"{workspaceRoot}/nx.json",
"{workspaceRoot}/tsconfig.base.json"
],
"production": [ "production": [
"default", "default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
@@ -11,18 +17,34 @@
] ]
}, },
"targetDefaults": { "targetDefaults": {
"build": { "dependsOn": ["^build"], "cache": true }, "build": {
"lint": { "cache": true }, "dependsOn": [
"test": { "cache": true } "^build"
],
"cache": true
},
"lint": {
"cache": true
},
"test": {
"cache": true
}
}, },
"plugins": [ "plugins": [
{ {
"plugin": "@nx/vite/plugin", "plugin": "@nx/vite/plugin",
"options": { "buildTargetName": "build", "serveTargetName": "serve", "testTargetName": "test" } "options": {
"buildTargetName": "build",
"serveTargetName": "serve",
"testTargetName": "test"
}
}, },
{ {
"plugin": "@nx/eslint/plugin", "plugin": "@nx/eslint/plugin",
"options": { "targetName": "lint" } "options": {
"targetName": "lint"
}
} }
] ],
} "analytics": true
}