package com.prudas.app.controller;

import com.prudas.app.dto.OfficeLocationResponse;
import com.prudas.app.service.OfficeLocationService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/offices")
@RequiredArgsConstructor
public class OfficeLocationController {

    private final OfficeLocationService service;

    @GetMapping
    public List<OfficeLocationResponse> findAll() {
        return service.findAll();
    }
}
