File

src/rse/rse.controller.ts

Prefix

rse

Index

Methods

Methods

deleteRSE
deleteRSE(params: IsParameterWithIdOfTable)
Decorators :
@Delete(':id')
Parameters :
Name Type Optional
params IsParameterWithIdOfTable No
Returns : any
getRSE
getRSE()
Decorators :
@Public()
@Get()
Returns : any
saveRSE
saveRSE(modelRSE: RSEValidation)
Decorators :
@UseInterceptors(undefined)
@Post()
Parameters :
Name Type Optional
modelRSE RSEValidation No
Returns : any
updateRSE
updateRSE(modelRSE: RSEValidation, params)
Decorators :
@UseInterceptors(undefined)
@Put(':id')
Parameters :
Name Type Optional
modelRSE RSEValidation No
params No
Returns : any
import { Body, Controller, Get, Param, Post, Put, UseInterceptors, Delete } from '@nestjs/common';
import { RseService } from './rse.service';
import { FileInterceptor } from '@nestjs/platform-express';
import { IsParameterWithIdOfTable } from 'src/database/validation/parameter-validation';
import { RSEValidation } from '../database/validation/rse-validation';
import { Public } from 'src/auth/auth.controller';
import { SkipThrottle } from '@nestjs/throttler';


@SkipThrottle()
@Controller('rse')
export class RseController {
    constructor(private rseService:RseService){}
    
    //Exponer punto para el listado de todas los RSE 
    @Public()
    @Get()
    getRSE():any{
        return this.rseService.findAllRSE();
    }

    //Exponer punto para almacenamiento de un nuevo RSE
    @UseInterceptors(FileInterceptor(''))
    @Post()
    saveRSE(@Body() modelRSE:RSEValidation):any{
        return this.rseService.saveRSE(modelRSE);
    }

    //Exponer punto para actualizar un RSE mediante su id
    @UseInterceptors(FileInterceptor(''))
    @Put(':id')
    updateRSE(@Body() modelRSE:RSEValidation, @Param() params):any{
        return this.rseService.updateRSE(params.id, modelRSE);
    }

    //Exponer punto para remover un RSE mediante su id    
    @Delete(':id')
    deleteRSE(@Param() params:IsParameterWithIdOfTable){
        return this.rseService.deleteRSE(params.id);
    }
    

}

results matching ""

    No results matching ""