Skip to content

Commit 59a221e

Browse files
committed
fix: adjusted project name length from 255 to 25 to match the backend model
1 parent df06cab commit 59a221e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

frontend/src/components/NavBar/ProjectCreationContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const CreationContent: React.FunctionComponent<DialogContentProps> = (dialogCont
8181
}, [projectId, isProjectIdTouched, allProjectIds])
8282

8383
useEffect(() => {
84-
if (projectName.length > 255) {
84+
if (projectName.length > 25) {
8585
setNameInvalid(true);
8686
setProjectNameHelperText(localization.dialog.projectNameHelperToLong);
8787
} else {

frontend/src/queries/project-requests.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export function createProject(projectId: string, projectData: {
3030
projectName: string,
3131
deploymentThreshold: string
3232
}): AxiosPromise {
33-
if (projectData.projectName && projectData.projectName.length > 255) {
34-
return Promise.reject(new Error("Project name exceeds the maximum length of 255 characters"));
33+
if (projectData.projectName && projectData.projectName.length > 25) {
34+
return Promise.reject(new Error("Project name exceeds the maximum length of 25 characters"));
3535
}
3636
return apiClient.post(urlAddress.api.createProject(projectId), projectData)
3737
}

0 commit comments

Comments
 (0)