public async Task <IActionResult> Location([FromBody] LocationSyncRequest request) { string userId = User.GetId(); await throtteledPushService.PushThrotteled(userId, request); return(StatusCode(201)); }
public async Task Location(LocationSyncRequest locationSyncRequest) { var client = await clientFactory(); var json = JsonConvert.SerializeObject(locationSyncRequest); var res = await client.PostAsync($"api/{userId}/digit-sync/location", new StringContent(json, Encoding.UTF8, "application/json")); if (!res.IsSuccessStatusCode) { throw new DigitPushServiceException($"Push creation request resulted in {res.StatusCode}."); } }