File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export async function createWorkBook(workBook: WorkBook): Promise<void> {
97
97
}
98
98
99
99
async function isExistingUrlSlug ( slug : string ) : Promise < boolean > {
100
- return ( await getWorkBookByUrlSlug ( slug ) ) ? true : false ;
100
+ return ! ! ( await getWorkBookByUrlSlug ( slug ) ) ;
101
101
}
102
102
103
103
async function isExistingWorkBook ( workBookId : number ) : Promise < boolean > {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export async function getWorkbookWithAuthor(
35
35
36
36
// Validate if the author of the workbook exists after the workbook has been created.
37
37
const workbookAuthor = await userCrud . getUserById ( workBook . authorId ) ;
38
- const isExistingAuthor = workbookAuthor ? true : false ;
38
+ const isExistingAuthor = ! ! workbookAuthor ;
39
39
40
40
return { workBook : workBook , isExistingAuthor : isExistingAuthor } ;
41
41
}
You can’t perform that action at this time.
0 commit comments