File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,7 @@ export default defineEventHandler(async event => {
1616 const userData = getRequestUser ( event ) ;
1717 if ( ! userData ?. logged ) return setResponseStatus ( event , 400 , 'NotLogged' ) ;
1818
19- const userSettings = await UserSettingsModel . findOne ( { user_id : userData . id } , { max_projects : true } ) ;
20-
21- const maxProjects = userSettings ?. max_projects || 3 ;
19+ const maxProjects = 20 ;
2220
2321 const existingUserProjects = await ProjectModel . countDocuments ( { owner : userData . id } ) ;
2422 if ( existingUserProjects >= maxProjects ) return setResponseStatus ( event , 400 , 'Already have max number of projects' ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { AuthContext } from "~/server/middleware/01-authorization";
44export default defineEventHandler ( async event => {
55 const userData : AuthContext = getRequestUser ( event ) as any ;
66 if ( ! userData . logged ) return ;
7- const userSettings = await UserSettingsModel . findOne ( { user_id : userData . id } , { max_projects : 1 } ) ;
8- return userSettings ?. max_projects || 3 ;
7+ // const userSettings = await UserSettingsModel.findOne({ user_id: userData.id }, { max_projects: 1 });
8+ // return userSettings?.max_projects || 3;
9+ return 20 ;
910} ) ;
You can’t perform that action at this time.
0 commit comments