import { Request } from 'express'
import { Response } from 'express-serve-static-core'
import { getRepository } from 'typeorm'
import { Tipo } from '@src/entity/Tipo'

export class TipoController {
  static async getAll (req: Request, res: Response) {
    const repository = await getRepository(Tipo)
    const tipos = await repository.find()
    res.status(200).json(tipos)
  }
}
