se borraron archivos no necesarios
This commit is contained in:
@@ -6,12 +6,19 @@ import {
|
||||
Patch,
|
||||
Param,
|
||||
Delete,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { StatusService } from './status.service';
|
||||
import { CreateStatusDto } from './dto/create-status.dto';
|
||||
import { UpdateStatusDto } from './dto/update-status.dto';
|
||||
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
|
||||
@Controller('status')
|
||||
export class StatusController {
|
||||
constructor(private readonly statusService: StatusService) {}
|
||||
|
||||
@Get()
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
async findAll() {
|
||||
return await this.statusService.findAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateStatusDto } from './dto/create-status.dto';
|
||||
import { UpdateStatusDto } from './dto/update-status.dto';
|
||||
import { Status } from './entities/status.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
@Injectable()
|
||||
export class StatusService {}
|
||||
export class StatusService {
|
||||
constructor(
|
||||
@InjectRepository(Status)
|
||||
private readonly statusRepo: Repository<Status>,
|
||||
) {}
|
||||
|
||||
async findAll() {
|
||||
return await this.statusRepo.find();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user