Switch upload-> update, switch damage to be a float, we can make better adjustments tomorrow and get rank wrapped up
This commit is contained in:
@@ -32,7 +32,7 @@ namespace TOOHUCardAPI.Controllers
|
||||
_userService = userService;
|
||||
}
|
||||
|
||||
[EndpointHandler("upload")]
|
||||
[EndpointHandler("update")]
|
||||
private async Task<IActionResult> UploadRankData(string body)
|
||||
{
|
||||
RankEntryDTO uploadrequest = JsonConvert.DeserializeObject<RankEntryDTO>(body, new RankEntryDTOConverter());
|
||||
|
||||
@@ -21,8 +21,8 @@ namespace TOOHUCardAPI.DTO.RankData
|
||||
[JsonProperty("wave")]
|
||||
public int Wave { get; set; }
|
||||
[JsonProperty("damage")]
|
||||
public long Damage { get; set; }
|
||||
[JsonProperty("updatetime")]
|
||||
public float Damage { get; set; }
|
||||
[JsonProperty("update_time")]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
[JsonIgnore]
|
||||
public Dictionary<string, string> Cards { get; set; }
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace TOOHUCardAPI.Data.Models
|
||||
public long AccountId { get; set; }
|
||||
public string Version { get; set; }
|
||||
public int Wave { get; set; }
|
||||
public long Damage { get; set; }
|
||||
public float Damage { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public List<RankTowerEntry> TowersUsed { get; set; }
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"method\": \"upload\",\n \"rank_type\": \"S\",\n \"steamid\": \"123\",\n \"userid\": \"12345\",\n \"username\": \"debug\",\n \"version\": \"S8\",\n \"wave\": 5,\n \"damage\": 5,\n \"card1\": \"debug\"\n}",
|
||||
"raw": "{\n \"method\": \"update\",\n \"rank_type\": \"S\",\n \"steamid\": \"123\",\n \"userid\": \"12345\",\n \"username\": \"debug\",\n \"version\": \"S8\",\n \"wave\": 5,\n \"damage\": 5,\n \"card1\": \"debug\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
|
||||
Reference in New Issue
Block a user