All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.somospnt.parametros.controller.ParametroController Maven / Gradle / Ivy

The newest version!
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package com.somospnt.parametros.controller;

import com.somospnt.parametros.domain.Parametro;
import com.somospnt.parametros.domain.ParametroDTO;
import com.somospnt.parametros.service.ParametroService;
import java.util.List;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ParametroController {

    private final ParametroService parametroService;

    public ParametroController(ParametroService parametroService) {
        this.parametroService = parametroService;
    }

    @GetMapping("/parametros")
    public List buscarTodosLosMetadatos() {
        return parametroService.buscarTodosLosMetadatos();
    }

    @PostMapping("/parametros")
    public Parametro guardar(@RequestBody Parametro parametro) {
        return parametroService.guardar(parametro);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy