refactoring

This commit is contained in:
Hamid Reza Mohammadi 2024-06-25 22:26:29 +03:30
parent 043b048295
commit 521546a5c7
2 changed files with 2 additions and 9 deletions

View File

@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Configuration;
using NAudio.Gui;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using RMuseum.Models.Ganjoor;
@ -961,7 +960,7 @@ namespace GanjooRazor.Pages
if (!catTop1RecitationsQuery.IsSuccessStatusCode)
{
return BadRequest(JsonConvert.DeserializeObject<string>(await catTop1RecitationsQuery.Content.ReadAsStringAsync()));
return new BadRequestObjectResult(JsonConvert.DeserializeObject<string>(await catTop1RecitationsQuery.Content.ReadAsStringAsync()));
}
var categoryTop1Recitations = JsonConvert.DeserializeObject<PublicRecitationViewModel[]>(await catTop1RecitationsQuery.Content.ReadAsStringAsync());

View File

@ -1,12 +1,6 @@
using GanjooRazor.Utils;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Newtonsoft.Json;
using Microsoft.AspNetCore.Mvc.RazorPages;
using RMuseum.Models.GanjoorAudio;
using RMuseum.Models.GanjoorAudio.ViewModels;
using System.Net.Http;
using System.Net;
using System.Threading.Tasks;
namespace GanjooRazor.Pages
{