Remove BaseService
This commit is contained in:
parent
1fde923dbf
commit
103f6d1e7a
@ -1,13 +1,12 @@
|
||||
import createError from 'http-errors'
|
||||
import {BaseService} from './BaseService'
|
||||
import {IDatabase} from '../database/IDatabase'
|
||||
import {ICredentials, INewUser, IUser, trim} from '@rondo.dev/common'
|
||||
import {IAuthService} from './IAuthService'
|
||||
import {UserEmail} from '../entities/UserEmail'
|
||||
import {User} from '../entities/User'
|
||||
import {compare, hash} from 'bcrypt'
|
||||
import {validate as validateEmail} from 'email-validator'
|
||||
import {Validator} from '../validator'
|
||||
import { ICredentials, INewUser, IUser, trim } from '@rondo.dev/common';
|
||||
import { compare, hash } from 'bcrypt';
|
||||
import { validate as validateEmail } from 'email-validator';
|
||||
import createError from 'http-errors';
|
||||
import { IDatabase } from '../database/IDatabase';
|
||||
import { User } from '../entities/User';
|
||||
import { UserEmail } from '../entities/UserEmail';
|
||||
import { Validator } from '../validator';
|
||||
import { IAuthService } from './IAuthService';
|
||||
|
||||
const SALT_ROUNDS = 10
|
||||
const MIN_PASSWORD_LENGTH = 10
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
import {
|
||||
EntityManager,
|
||||
EntitySchema,
|
||||
ObjectType,
|
||||
Repository,
|
||||
} from 'typeorm'
|
||||
import {ITransactionManager} from '../database/ITransactionManager'
|
||||
|
||||
export abstract class BaseService {
|
||||
constructor(protected readonly transactionManager: ITransactionManager) {}
|
||||
|
||||
getEntityManager(): EntityManager {
|
||||
return this.transactionManager.getEntityManager()
|
||||
}
|
||||
|
||||
getRepository<Entity>(
|
||||
target: ObjectType<Entity> | EntitySchema<Entity> | string,
|
||||
): Repository<Entity> {
|
||||
return this.transactionManager.getRepository(target)
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,3 @@
|
||||
export * from './BaseService'
|
||||
export * from './IAuthService'
|
||||
export * from './AuthService'
|
||||
export * from './IUserPermissions'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user