package de.avatic.lcc.controller;

import de.avatic.lcc.dto.error.FrontendErrorDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping({"/api/error", "/api/error/"})
public class ErrorController {

    @PostMapping
    public void error(@RequestBody List<FrontendErrorDTO> error) {
        System.out.println(error.toString());
        //TODO store in database.
    }

}
