package com.example.nto.controller; import com.example.nto.dto.CredentialsDTO; import com.example.nto.dto.TerminalDTO; import com.example.nto.service.CredentialsService; import com.example.nto.service.TerminalService; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/api/terminal") @RequiredArgsConstructor public class TerminalController { private final TerminalService terminalService; @GetMapping("/{id}") public ResponseEntity<TerminalDTO> getCredentialsById(@PathVariable long id) { return ResponseEntity.ok(terminalService.getTerminalbyId(id)); } }