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> {
9797}
9898
9999async function isExistingUrlSlug ( slug : string ) : Promise < boolean > {
100- return ( await getWorkBookByUrlSlug ( slug ) ) ? true : false ;
100+ return ! ! ( await getWorkBookByUrlSlug ( slug ) ) ;
101101}
102102
103103async function isExistingWorkBook ( workBookId : number ) : Promise < boolean > {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export async function getWorkbookWithAuthor(
3535
3636 // Validate if the author of the workbook exists after the workbook has been created.
3737 const workbookAuthor = await userCrud . getUserById ( workBook . authorId ) ;
38- const isExistingAuthor = workbookAuthor ? true : false ;
38+ const isExistingAuthor = ! ! workbookAuthor ;
3939
4040 return { workBook : workBook , isExistingAuthor : isExistingAuthor } ;
4141}
You can’t perform that action at this time.
0 commit comments