@@ -68,23 +68,23 @@ export class ProjectService implements IProjectService {
6868 * Gets all projects that the user may see.
6969 */
7070 public async getAllProjects ( user : User ) : Promise < readonly Project [ ] > {
71- const teams = await this . _teams . find ( )
71+ const teams = await this . _teams . find ( ) ;
7272 const teamIds = teams
73- . filter ( team => team . users . includes ( user . id . toString ( ) ) )
74- . map ( team => team . id ) ;
73+ . filter ( ( team ) => team . users . includes ( user . id . toString ( ) ) )
74+ . map ( ( team ) => team . id ) ;
7575
7676 const [ settings ] = await this . _settings . find ( ) ;
7777 const allowRatingProjects = settings . application . allowRatingProjects ;
7878 const isAdmin = user . role == UserRole . Root ;
7979
80- const projects = await this . _projects . find ( )
81- return projects . filter ( project => {
82- return (
83- isAdmin
84- || ( project . allowRating && allowRatingProjects )
85- || teamIds . includes ( project . team . id )
86- ) ;
87- } ) ;
80+ const projects = await this . _projects . find ( ) ;
81+ return projects . filter ( ( project ) => {
82+ return (
83+ isAdmin ||
84+ ( project . allowRating && allowRatingProjects ) ||
85+ teamIds . includes ( project . team . id )
86+ ) ;
87+ } ) ;
8888 }
8989
9090 /**
@@ -133,7 +133,10 @@ export class ProjectService implements IProjectService {
133133 * Deletes a project by its id.
134134 * @param id The id of the project
135135 */
136- public async deleteProjectByID ( id : number , currentUserId : User ) : Promise < void > {
136+ public async deleteProjectByID (
137+ id : number ,
138+ currentUserId : User ,
139+ ) : Promise < void > {
137140 const project = await this . _projects . findOneBy ( { id } ) ;
138141
139142 if ( ! project ) {
@@ -152,7 +155,7 @@ export class ProjectService implements IProjectService {
152155 */
153156 private async checkPermission ( project : Project , user : User ) : Promise < void > {
154157 if ( user . role === UserRole . Root ) {
155- return
158+ return ;
156159 }
157160
158161 const team = project . team ;
0 commit comments