diff --git a/src/Application/TodoItems/Commands/CreateTodoItem/CreateTodoItem.cs b/src/Application/Features/TodoItems/Commands/CreateTodoItem/CreateTodoItem.cs similarity index 100% rename from src/Application/TodoItems/Commands/CreateTodoItem/CreateTodoItem.cs rename to src/Application/Features/TodoItems/Commands/CreateTodoItem/CreateTodoItem.cs diff --git a/src/Application/TodoItems/Commands/CreateTodoItem/CreateTodoItemCommandValidator.cs b/src/Application/Features/TodoItems/Commands/CreateTodoItem/CreateTodoItemCommandValidator.cs similarity index 100% rename from src/Application/TodoItems/Commands/CreateTodoItem/CreateTodoItemCommandValidator.cs rename to src/Application/Features/TodoItems/Commands/CreateTodoItem/CreateTodoItemCommandValidator.cs diff --git a/src/Application/TodoItems/Commands/DeleteTodoItem/DeleteTodoItem.cs b/src/Application/Features/TodoItems/Commands/DeleteTodoItem/DeleteTodoItem.cs similarity index 100% rename from src/Application/TodoItems/Commands/DeleteTodoItem/DeleteTodoItem.cs rename to src/Application/Features/TodoItems/Commands/DeleteTodoItem/DeleteTodoItem.cs diff --git a/src/Application/TodoItems/Commands/UpdateTodoItem/UpdateTodoItem.cs b/src/Application/Features/TodoItems/Commands/UpdateTodoItem/UpdateTodoItem.cs similarity index 100% rename from src/Application/TodoItems/Commands/UpdateTodoItem/UpdateTodoItem.cs rename to src/Application/Features/TodoItems/Commands/UpdateTodoItem/UpdateTodoItem.cs diff --git a/src/Application/TodoItems/Commands/UpdateTodoItem/UpdateTodoItemCommandValidator.cs b/src/Application/Features/TodoItems/Commands/UpdateTodoItem/UpdateTodoItemCommandValidator.cs similarity index 100% rename from src/Application/TodoItems/Commands/UpdateTodoItem/UpdateTodoItemCommandValidator.cs rename to src/Application/Features/TodoItems/Commands/UpdateTodoItem/UpdateTodoItemCommandValidator.cs diff --git a/src/Application/TodoItems/Commands/UpdateTodoItemDetail/UpdateTodoItemDetail.cs b/src/Application/Features/TodoItems/Commands/UpdateTodoItemDetail/UpdateTodoItemDetail.cs similarity index 100% rename from src/Application/TodoItems/Commands/UpdateTodoItemDetail/UpdateTodoItemDetail.cs rename to src/Application/Features/TodoItems/Commands/UpdateTodoItemDetail/UpdateTodoItemDetail.cs diff --git a/src/Application/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs b/src/Application/Features/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs similarity index 100% rename from src/Application/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs rename to src/Application/Features/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs diff --git a/src/Application/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs b/src/Application/Features/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs similarity index 100% rename from src/Application/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs rename to src/Application/Features/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs diff --git a/src/Application/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPagination.cs b/src/Application/Features/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPagination.cs similarity index 100% rename from src/Application/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPagination.cs rename to src/Application/Features/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPagination.cs diff --git a/src/Application/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPaginationQueryValidator.cs b/src/Application/Features/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPaginationQueryValidator.cs similarity index 100% rename from src/Application/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPaginationQueryValidator.cs rename to src/Application/Features/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPaginationQueryValidator.cs diff --git a/src/Application/TodoItems/Queries/GetTodoItemsWithPagination/TodoItemBriefDto.cs b/src/Application/Features/TodoItems/Queries/GetTodoItemsWithPagination/TodoItemBriefDto.cs similarity index 100% rename from src/Application/TodoItems/Queries/GetTodoItemsWithPagination/TodoItemBriefDto.cs rename to src/Application/Features/TodoItems/Queries/GetTodoItemsWithPagination/TodoItemBriefDto.cs diff --git a/src/Application/TodoLists/Commands/CreateTodoList/CreateTodoList.cs b/src/Application/Features/TodoLists/Commands/CreateTodoList/CreateTodoList.cs similarity index 100% rename from src/Application/TodoLists/Commands/CreateTodoList/CreateTodoList.cs rename to src/Application/Features/TodoLists/Commands/CreateTodoList/CreateTodoList.cs diff --git a/src/Application/TodoLists/Commands/CreateTodoList/CreateTodoListCommandValidator.cs b/src/Application/Features/TodoLists/Commands/CreateTodoList/CreateTodoListCommandValidator.cs similarity index 100% rename from src/Application/TodoLists/Commands/CreateTodoList/CreateTodoListCommandValidator.cs rename to src/Application/Features/TodoLists/Commands/CreateTodoList/CreateTodoListCommandValidator.cs diff --git a/src/Application/TodoLists/Commands/DeleteTodoList/DeleteTodoList.cs b/src/Application/Features/TodoLists/Commands/DeleteTodoList/DeleteTodoList.cs similarity index 100% rename from src/Application/TodoLists/Commands/DeleteTodoList/DeleteTodoList.cs rename to src/Application/Features/TodoLists/Commands/DeleteTodoList/DeleteTodoList.cs diff --git a/src/Application/TodoLists/Commands/PurgeTodoLists/PurgeTodoLists.cs b/src/Application/Features/TodoLists/Commands/PurgeTodoLists/PurgeTodoLists.cs similarity index 100% rename from src/Application/TodoLists/Commands/PurgeTodoLists/PurgeTodoLists.cs rename to src/Application/Features/TodoLists/Commands/PurgeTodoLists/PurgeTodoLists.cs diff --git a/src/Application/TodoLists/Commands/UpdateTodoList/UpdateTodoList.cs b/src/Application/Features/TodoLists/Commands/UpdateTodoList/UpdateTodoList.cs similarity index 100% rename from src/Application/TodoLists/Commands/UpdateTodoList/UpdateTodoList.cs rename to src/Application/Features/TodoLists/Commands/UpdateTodoList/UpdateTodoList.cs diff --git a/src/Application/TodoLists/Commands/UpdateTodoList/UpdateTodoListCommandValidator.cs b/src/Application/Features/TodoLists/Commands/UpdateTodoList/UpdateTodoListCommandValidator.cs similarity index 100% rename from src/Application/TodoLists/Commands/UpdateTodoList/UpdateTodoListCommandValidator.cs rename to src/Application/Features/TodoLists/Commands/UpdateTodoList/UpdateTodoListCommandValidator.cs diff --git a/src/Application/TodoLists/Queries/GetTodos/GetTodos.cs b/src/Application/Features/TodoLists/Queries/GetTodos/GetTodos.cs similarity index 100% rename from src/Application/TodoLists/Queries/GetTodos/GetTodos.cs rename to src/Application/Features/TodoLists/Queries/GetTodos/GetTodos.cs diff --git a/src/Application/TodoLists/Queries/GetTodos/TodoItemDto.cs b/src/Application/Features/TodoLists/Queries/GetTodos/TodoItemDto.cs similarity index 100% rename from src/Application/TodoLists/Queries/GetTodos/TodoItemDto.cs rename to src/Application/Features/TodoLists/Queries/GetTodos/TodoItemDto.cs diff --git a/src/Application/TodoLists/Queries/GetTodos/TodoListDto.cs b/src/Application/Features/TodoLists/Queries/GetTodos/TodoListDto.cs similarity index 100% rename from src/Application/TodoLists/Queries/GetTodos/TodoListDto.cs rename to src/Application/Features/TodoLists/Queries/GetTodos/TodoListDto.cs diff --git a/src/Application/TodoLists/Queries/GetTodos/TodosVm.cs b/src/Application/Features/TodoLists/Queries/GetTodos/TodosVm.cs similarity index 100% rename from src/Application/TodoLists/Queries/GetTodos/TodosVm.cs rename to src/Application/Features/TodoLists/Queries/GetTodos/TodosVm.cs diff --git a/src/Application/WeatherForecasts/Queries/GetWeatherForecasts/GetWeatherForecastsQuery.cs b/src/Application/Features/WeatherForecasts/Queries/GetWeatherForecasts/GetWeatherForecastsQuery.cs similarity index 100% rename from src/Application/WeatherForecasts/Queries/GetWeatherForecasts/GetWeatherForecastsQuery.cs rename to src/Application/Features/WeatherForecasts/Queries/GetWeatherForecasts/GetWeatherForecastsQuery.cs diff --git a/src/Application/WeatherForecasts/Queries/GetWeatherForecasts/WeatherForecast.cs b/src/Application/Features/WeatherForecasts/Queries/GetWeatherForecasts/WeatherForecast.cs similarity index 100% rename from src/Application/WeatherForecasts/Queries/GetWeatherForecasts/WeatherForecast.cs rename to src/Application/Features/WeatherForecasts/Queries/GetWeatherForecasts/WeatherForecast.cs diff --git a/src/Infrastructure/Data/ApplicationDbContextInitialiser.cs b/src/Infrastructure/Data/ApplicationDbContextInitialiser.cs index 14e7596..b17017b 100644 --- a/src/Infrastructure/Data/ApplicationDbContextInitialiser.cs +++ b/src/Infrastructure/Data/ApplicationDbContextInitialiser.cs @@ -77,7 +77,7 @@ public async Task TrySeedAsync() } // Default users - var administrator = new ApplicationUser { UserName = "administrator@localhost", Email = "administrator@localhost" }; + var administrator = new ApplicationUser { UserName = "administrator", Email = "administrator@localhost.com" }; if (_userManager.Users.All(u => u.UserName != administrator.UserName)) { diff --git a/src/Web/DependencyInjection.cs b/src/Web/DependencyInjection.cs index 43694ec..6bb1f9e 100644 --- a/src/Web/DependencyInjection.cs +++ b/src/Web/DependencyInjection.cs @@ -4,7 +4,6 @@ using SkillSphere.Web.Infrastructure; using SkillSphere.Web.Services; using SkillSphere.Application.Common.Interfaces; -using SkillSphere.Infrastructure.Data; using ZymLabs.NSwag.FluentValidation; namespace SkillSphere.Web; diff --git a/src/Web/Pages/Error.cshtml b/src/Web/Pages/Error.cshtml deleted file mode 100644 index 6f92b95..0000000 --- a/src/Web/Pages/Error.cshtml +++ /dev/null @@ -1,26 +0,0 @@ -@page -@model ErrorModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- Swapping to the Development environment displays detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

diff --git a/src/Web/Pages/Error.cshtml.cs b/src/Web/Pages/Error.cshtml.cs deleted file mode 100644 index 81d909e..0000000 --- a/src/Web/Pages/Error.cshtml.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Diagnostics; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; - -namespace testSphere.Web.Pages; - -[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] -public class ErrorModel : PageModel -{ - private readonly ILogger _logger; - - public ErrorModel(ILogger logger) - { - _logger = logger; - } - - public string? RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } -} diff --git a/src/Web/Pages/Shared/_LoginPartial.cshtml b/src/Web/Pages/Shared/_LoginPartial.cshtml deleted file mode 100644 index 8f4223c..0000000 --- a/src/Web/Pages/Shared/_LoginPartial.cshtml +++ /dev/null @@ -1,36 +0,0 @@ -@using SkillSphere.Infrastructure.Identity -@using Microsoft.AspNetCore.Identity -@inject SignInManager SignInManager -@inject UserManager UserManager - -@{ - string? returnUrl = null; - var query = ViewContext.HttpContext.Request.Query; - if (query.ContainsKey("returnUrl")) - { - returnUrl = query["returnUrl"]; - } -} - - diff --git a/src/Web/Pages/_ViewImports.cshtml b/src/Web/Pages/_ViewImports.cshtml deleted file mode 100644 index 8f45b92..0000000 --- a/src/Web/Pages/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using testSphere.Web -@namespace testSphere.Web.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/src/Web/Web.csproj b/src/Web/Web.csproj index a0f9527..5ca5566 100644 --- a/src/Web/Web.csproj +++ b/src/Web/Web.csproj @@ -26,6 +26,12 @@ + + <_ContentIncludedByDefault Remove="Pages\Error.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Shared\_LoginPartial.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\_ViewImports.cshtml" /> + +