package com.example.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.common.APIResponse;
import com.example.demo.entity.Currency;
import com.example.demo.repository.CurrencyRepo;
import com.example.demo.service.CurrencyService;

@Service
public class CurrencyServiceImpl implements CurrencyService {

	@Autowired
	private CurrencyRepo repo;

	@Override
	public APIResponse getall() {
		APIResponse api = new APIResponse();
		List<Currency> cur = repo.findAll();
		api.setData(cur);
		api.setMessage("List Of Currency");
		api.setMsgCode("LIST OF CURRENCY");
		return api;
	}

}
