Skip to content

Commit

Permalink
#226 rename PagesController to PageController
Browse files Browse the repository at this point in the history
  • Loading branch information
pournasserian committed Nov 25, 2023
1 parent 4534362 commit 6e6bc06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

namespace FluentCMS.Api.Controllers;

public class PagesController : BaseController
public class PageController : BaseController
{
private readonly IPageService _pageService;
private readonly IMapper _mapper;

public PagesController(IPageService pageService, IMapper mapper)
public PageController(IPageService pageService, IMapper mapper)
{
_pageService = pageService;
_mapper = mapper;
Expand Down
6 changes: 3 additions & 3 deletions src/FluentCMS.Web.UI/Pages/Pages/PageEdit.razor
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}
try
{
var response = (await _httpClient.GetFromJsonAsync<ApiResult<PageResponse>>($"pages/getById/{Id.Value}"))!;
var response = (await _httpClient.GetFromJsonAsync<ApiResult<PageResponse>>($"page/getById/{Id.Value}"))!;
if (response.Data != null)
{
Page = new()
Expand Down Expand Up @@ -80,7 +80,7 @@
var createCommand = Page;
try
{
await _httpClient.PostAsJsonAsync($"pages/create", createCommand);
await _httpClient.PostAsJsonAsync($"page/create", createCommand);
_navigationManager.NavigateTo($"/admin/pages/{SiteId}");
}
catch (Exception)
Expand All @@ -103,7 +103,7 @@
};
try
{
await _httpClient.PutAsJsonAsync($"pages/update", updateCommand);
await _httpClient.PutAsJsonAsync($"page/update", updateCommand);
_navigationManager.NavigateTo($"/admin/pages/{updateCommand.SiteId}");
}
catch (Exception)
Expand Down

0 comments on commit 6e6bc06

Please sign in to comment.