refactor(backend): fix nestjs-typed linting errors

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2023-06-25 19:35:38 +02:00 committed by Tilman Vatteroth
parent 8daffbb11b
commit a5d8c9cc33
16 changed files with 60 additions and 20 deletions

View file

@ -12,8 +12,8 @@ import { User } from '../users/user.entity';
import { UsersModule } from '../users/users.module';
import { Identity } from './identity.entity';
import { IdentityService } from './identity.service';
import { LdapStrategy } from './ldap/ldap.strategy';
import { LocalStrategy } from './local/local.strategy';
import { LdapAuthGuard, LdapStrategy } from './ldap/ldap.strategy';
import { LocalAuthGuard, LocalStrategy } from './local/local.strategy';
@Module({
imports: [
@ -23,7 +23,13 @@ import { LocalStrategy } from './local/local.strategy';
LoggerModule,
],
controllers: [],
providers: [IdentityService, LocalStrategy, LdapStrategy],
providers: [
IdentityService,
LocalStrategy,
LdapStrategy,
LdapAuthGuard,
LocalAuthGuard,
],
exports: [IdentityService, LocalStrategy, LdapStrategy],
})
export class IdentityModule {}

View file

@ -3,11 +3,13 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Type } from 'class-transformer';
import { IsLowercase, IsString } from 'class-validator';
import { Username } from '../../utils/username';
export class LoginDto {
@Type(() => String)
@IsString()
@IsLowercase()
username: Username;

View file

@ -3,11 +3,13 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Type } from 'class-transformer';
import { IsLowercase, IsString } from 'class-validator';
import { Username } from '../../utils/username';
export class RegisterDto {
@Type(() => String)
@IsString()
@IsLowercase()
username: Username;