1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-01 05:15:36 +01:00
GiantsTools/Giants.WebApi/Controllers/BranchesController.cs

31 lines
822 B
C#
Raw Normal View History

2022-09-09 07:31:24 +02:00
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);
}
}
}