@@ -459,8 +459,9 @@ export async function checkIfPb(
459459 "stopOnLetter" in result &&
460460 result . stopOnLetter === true &&
461461 result . acc < 100
462- )
462+ ) {
463463 return false ;
464+ }
464465
465466 if ( mode === "quote" ) {
466467 return false ;
@@ -510,8 +511,9 @@ export async function checkIfTagPb(
510511 "stopOnLetter" in result &&
511512 result . stopOnLetter === true &&
512513 result . acc < 100
513- )
514+ ) {
514515 return [ ] ;
516+ }
515517
516518 if ( mode === "quote" ) {
517519 return [ ] ;
@@ -605,8 +607,9 @@ export async function linkDiscord(
605607 discordAvatar ?: string ,
606608) : Promise < void > {
607609 const updates : Partial < DBUser > = { discordId } ;
608- if ( discordAvatar !== undefined && discordAvatar !== null )
610+ if ( discordAvatar !== undefined && discordAvatar !== null ) {
609611 updates . discordAvatar = discordAvatar ;
612+ }
610613
611614 await updateUser ( { uid } , { $set : updates } , { stack : "link discord" } ) ;
612615}
@@ -1055,10 +1058,11 @@ export async function updateInbox(
10551058
10561059 // mongo doesnt support ??= i think
10571060 // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1058- if ( inventory === null )
1061+ if ( inventory === null ) {
10591062 inventory = {
10601063 badges : [ ] ,
10611064 } ;
1065+ }
10621066 // mongo doesnt support ??= i think
10631067 // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
10641068 if ( inventory . badges === null ) inventory . badges = [ ] ;
@@ -1104,8 +1108,9 @@ export async function updateInbox(
11041108 { $unset : "tmp" } ,
11051109 ] ) ;
11061110
1107- if ( update . matchedCount !== 1 )
1111+ if ( update . matchedCount !== 1 ) {
11081112 throw new MonkeyError ( 404 , "User not found" , "update inbox" ) ;
1113+ }
11091114}
11101115
11111116export async function updateStreak (
@@ -1229,12 +1234,13 @@ async function updateUser(
12291234) : Promise < void > {
12301235 const result = await getUsersCollection ( ) . updateOne ( filter , update ) ;
12311236
1232- if ( result . matchedCount !== 1 )
1237+ if ( result . matchedCount !== 1 ) {
12331238 throw new MonkeyError (
12341239 error . statusCode ?? 404 ,
12351240 error . message ?? "User not found" ,
12361241 error . stack ,
12371242 ) ;
1243+ }
12381244}
12391245
12401246export async function getFriends ( uid : string ) : Promise < DBFriend [ ] > {
0 commit comments