fehler im login korrigiert
This commit is contained in:
@@ -15,8 +15,12 @@ export class UserRepository extends Repository<User> {
|
||||
super(User, dataSource.createEntityManager());
|
||||
}
|
||||
|
||||
findByUsername(username: string): Promise<User> {
|
||||
return this.findOne({ where: { username }, relations: ['external'] });
|
||||
findByUsername(username: string, {settings = false}: { settings: boolean }): Promise<User> {
|
||||
const relations = ['external'];
|
||||
if (settings ) {
|
||||
relations.push('settings')
|
||||
}
|
||||
return this.findOne({ where: { username }, relations: relations });
|
||||
}
|
||||
|
||||
findById(id: string): Promise<User> {
|
||||
|
||||
Reference in New Issue
Block a user