using System; using BlueWest.Data; using BlueWest.WebApi.EF; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace BlueWest.WebApi.Controllers; /// /// The controller responsible to fetch currency data /// [ApiController] [Route("[controller]")] [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] [Authorize(AuthenticationSchemes = CookieAuthenticationDefaults.AuthenticationScheme)] public class FinanceController : ControllerBase { private readonly FinanceDbContext _dbContext; /// /// Finance Controller Api Controller /// /// The finance database context 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(); } }