using System; using BlueWest.Data; using BlueWest.WebApi.EF; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace BlueWest.WebApi.Controllers; /// /// The controller responsible to fetch currency data /// [ApiController] [Route("[controller]")] internal class FinanceController : ControllerBase { private readonly FinanceDbContext _dbContext; public FinanceController(FinanceDbContext dbContext) { _dbContext = dbContext; } /// /// Returns a transaction by the provided id /// /// /// /// [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] [HttpGet("{userId}/transactions/{transactionId}")] public ActionResult GetTransactionsById(int userId, TimeSpan transactionId) { return new NotFoundResult(); } /// /// Posts a finance transaction /// /// /// /// [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] [HttpPost("{userId}/transactions")] public ActionResult PostTransaction(int userId, FinanceOpCreate financeTransaction) { return new BadRequestResult(); } /// /// Get Transactions /// /// /// [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] [HttpGet("{userId}/transactions")] public ActionResult GetTransactions(int userId) { return Ok(); } }