package com.safeway.epe.controller;

import com.safeway.epe.domain.Offsets;
import com.safeway.epe.domain.TransactionRecorder;
import com.safeway.epe.service.TransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TransactionController
{
    @Autowired
    private TransactionService service;

    @GetMapping("transaction/{uuid}")
    public ResponseEntity<List<Offsets>> getTransaction(@PathVariable("uuid") String uuid)
    {
        return service.produceMessage(uuid);
    }
}