Browse Source

fix: handle project name length in backend

pull/2416/head
Wing-Kam Wong 2 years ago
parent
commit
ac346945f6
  1. 4
      packages/nocodb/src/lib/meta/api/projectApis.ts

4
packages/nocodb/src/lib/meta/api/projectApis.ts

@ -95,6 +95,10 @@ async function projectCreate(req: Request<any, any>, res) {
projectBody.is_meta = false;
}
if (projectBody?.title.length > 50) {
NcError.badRequest('Project title exceeds 50 characters');
}
if (await Project.getByTitle(projectBody?.title)) {
NcError.badRequest('Project title already in use');
}

Loading…
Cancel
Save