better existsUserByName

This commit is contained in:
StarAppeal
2025-09-18 22:36:52 +02:00
parent af68a1ed7e
commit ded120513e
+1 -1
View File
@@ -74,7 +74,7 @@ export class UserService {
}
public async existsUserByName(name: string): Promise<boolean> {
return !!(await UserModel.findOne({name}).exec());
return (await UserModel.countDocuments({ name })) > 0;
}
public async clearSpotifyConfigByUUID(uuid: string): Promise<IUser | null> {