Skip to content

Commit

Permalink
rollback v2
Browse files Browse the repository at this point in the history
  • Loading branch information
peter committed Feb 21, 2024
1 parent 7907d4a commit bf682cf
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions DoSomethingService/Controllers/v1/SomethingV1Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ namespace DoSomethingService.Controllers.v1;
/// <summary>
/// This is an api to return some data in a made up senario
/// </summary>
[Route("api/v{version:apiVersion}/[controller]")]
[ApiController]
[ApiVersion("1.0")]
[ApiVersion("2.0")]
[Route("api/v{version:apiVersion}/[controller]")]
public class SomethingController : ControllerBase
{
private readonly ILogger<SomethingController> _logger;
Expand Down Expand Up @@ -43,24 +42,7 @@ public string Get(string whatToDo)
{
return $"You wanted me to {whatToDo}, there I did something";
}
/// <summary>
/// If you need to do something then, just tell it
/// what you want to do
/// </summary>
/// <param name="whatToDo">The thing you want it to do</param>
/// <param name="numberOfTimes">The number of times you want it to do something</param>
/// <returns>What happened</returns>
[MapToApiVersion("2.0")]
[HttpGet("DoSomething")]
public string Get(string whatToDo, int numberOfTimes)
{
var returnString = "";
for (int i = 0; i < numberOfTimes; i++)
{
returnString += $"You wanted me to {whatToDo}, there I did something";
}
return returnString;
}

/// <summary>
/// If you want to post something for it to do
/// </summary>
Expand Down

0 comments on commit bf682cf

Please sign in to comment.