1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-24 07:05:37 +01:00
GiantsTools/Giants.WebApi/Controllers/BranchesController.cs
2022-09-08 22:31:24 -07:00

31 lines
822 B
C#

using Giants.DataContract.V1;
using Giants.Services;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Giants.WebApi.Controllers
{
[ApiController]
[ApiVersion("1.0")]
[ApiVersion("1.1")]
[Route("api/[controller]")]
public class BranchesController : ControllerBase
{
private readonly IVersioningService versioningService;
public BranchesController(IVersioningService branchService)
{
this.versioningService = branchService;
}
[HttpGet]
public async Task<IEnumerable<string>> GetBranches([FromQuery]string appName)
{
ArgumentUtility.CheckStringForNullOrEmpty(appName);
return await this.versioningService.GetBranches(appName);
}
}
}