I'm an idiot, they store encoded data for towers, we dont need a separate object unless we want to

This commit is contained in:
2021-11-06 22:18:12 -04:00
parent 7ef9c0d498
commit f23d108fe7
9 changed files with 135 additions and 50 deletions

View File

@@ -28,31 +28,10 @@ namespace TOOHUCardAPI.Controllers
_userService = userService;
}
private RankType ParseRankType(string rankType)
{
if (rankType == null || rankType.Length > 1)
{
return RankType.All;
}
char identifier = rankType.ToCharArray()[0];
if (identifier == (char) RankType.Single)
{
return RankType.Single;
}
if (identifier == (char) RankType.Team)
{
return RankType.Team;
}
return RankType.All;
}
[HttpGet]
public async Task<IActionResult> GetRankData(string rank_type)
{
RankType parsedRankType = ParseRankType(rank_type);
RankType parsedRankType = RankTypeExtensions.ParseRankType(rank_type);
return Ok(new OkResponse());
}