public async Task <string> DeleteOpponentAdvertRequest(AdvertRequestOpponent request) { if (App.Current.Properties.ContainsKey("loggedUser")) { try { User currentUser = App.Current.Properties["loggedUser"] as User; var input = $"https://www.harbisaha.com/api/AdvertRequest/DeletePlayerAdvertRequest?opponentAdvertRequestId=" + request.Id + " &userId=" + currentUser.Id; //var client = await GetClient(); var client = await GetClient(); var result = await client.GetStringAsync(input); string response = JsonConvert.DeserializeObject <string>((result)); return("OK"); } catch (Exception) { return("Bir sorun oluştu"); } } else { return("Önce giriş yapmalısınız."); } }
public DeleteAdvertRequestPage(string type, AdvertRequestPlayer playerAdvertRequest, AdvertRequestOpponent opponentAdvertRequest) { InitializeComponent(); mainPlayerRequest = playerAdvertRequest; mainOpponentRequest = opponentAdvertRequest; }