diff --git a/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRole.cs b/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRole.cs
index 74b84ae..3796735 100644
--- a/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRole.cs
+++ b/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRole.cs
@@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Identity;
namespace CodeLiturgy.Data.Application.Users
{
///
- [MapFrom(typeof(ApplicationRoleUnique))]
public partial class ApplicationRole : IdentityRole
{
diff --git a/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRoleUnique.cs b/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRoleUnique.cs
index 7b59c59..cbd89bf 100644
--- a/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRoleUnique.cs
+++ b/CodeLiturgy.Views/Application/ApplicationRole/ApplicationRoleUnique.cs
@@ -2,7 +2,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application.Users
{
- [MapFrom(typeof(ApplicationRole))]
public partial class ApplicationRoleUnique
{
public string Id { get; set; }
diff --git a/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaim.cs b/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaim.cs
index e1e71a4..6fbf77b 100644
--- a/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaim.cs
+++ b/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaim.cs
@@ -6,7 +6,6 @@ namespace CodeLiturgy.Data.Application.Users
{
///
- [MapFrom(typeof(ApplicationRoleClaimUnique))]
public partial class ApplicationRoleClaim : IdentityRoleClaim
{
diff --git a/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaimUnique.cs b/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaimUnique.cs
index 5a595f4..3a5c5f0 100644
--- a/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaimUnique.cs
+++ b/CodeLiturgy.Views/Application/ApplicationRoleClaim/ApplicationRoleClaimUnique.cs
@@ -2,7 +2,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application.Users
{
- [MapFrom(typeof(ApplicationRoleClaim))]
public partial class ApplicationRoleClaimUnique
{
public int Id { get; set; }
diff --git a/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUser.cs b/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUser.cs
index 9a95499..439fb0b 100644
--- a/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUser.cs
+++ b/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUser.cs
@@ -13,8 +13,6 @@ namespace CodeLiturgy.Data.Application.Users
///
/// Application User in the Identity System.
///
- [MapFrom(typeof(ApplicationUserUnique))]
- [UseUpdate]
public partial class ApplicationUser : IdentityUser
{
public new string Id { get; set; }
diff --git a/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUserUnique.cs b/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUserUnique.cs
index f2bfa88..f4c58f3 100644
--- a/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUserUnique.cs
+++ b/CodeLiturgy.Views/Application/ApplicationUser/ApplicationUserUnique.cs
@@ -3,7 +3,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application.Users
{
- [MapFrom(typeof(ApplicationUser))]
public partial class ApplicationUserUnique
{
public string Id { get; set; }
diff --git a/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaim.cs b/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaim.cs
index 0f7b3a9..4d815eb 100644
--- a/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaim.cs
+++ b/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaim.cs
@@ -3,7 +3,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application.Users
{
- [MapFrom(typeof(ApplicationUserClaimUnique))]
///
public partial class ApplicationUserClaim : IdentityUserClaim
diff --git a/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaimUnique.cs b/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaimUnique.cs
index f4c492b..fca710a 100644
--- a/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaimUnique.cs
+++ b/CodeLiturgy.Views/Application/ApplicationUserClaim/ApplicationUserClaimUnique.cs
@@ -2,7 +2,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application.Users
{
- [MapFrom(typeof(ApplicationUserClaim))]
public partial class ApplicationUserClaimUnique
{
public int Id { get; set; }
diff --git a/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRole.cs b/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRole.cs
index 5d6d944..97d0f60 100644
--- a/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRole.cs
+++ b/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRole.cs
@@ -7,7 +7,6 @@ namespace CodeLiturgy.Data.Application.Users
{
///
- [MapFrom(typeof(ApplicationUserRoleUnique))]
public partial class ApplicationUserRole : IdentityUserRole
{
diff --git a/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRoleUnique.cs b/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRoleUnique.cs
index f26a157..48c29d2 100644
--- a/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRoleUnique.cs
+++ b/CodeLiturgy.Views/Application/ApplicationUserRole/ApplicationUserRoleUnique.cs
@@ -2,7 +2,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application.Users
{
- [MapFrom(typeof(ApplicationUserRole))]
public partial class ApplicationUserRoleUnique
{
public string UserId { get; set; }
diff --git a/CodeLiturgy.Views/Application/Sites/Site.cs b/CodeLiturgy.Views/Application/Sites/Site.cs
index cbf78ce..a3c5856 100644
--- a/CodeLiturgy.Views/Application/Sites/Site.cs
+++ b/CodeLiturgy.Views/Application/Sites/Site.cs
@@ -6,12 +6,7 @@ using MapTo;
namespace CodeLiturgy.Data.Application
{
- [MapFrom(new []
- {
- typeof(SiteUnique),
- typeof(SiteCreate)
- })]
-
+
public partial class Site
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
diff --git a/CodeLiturgy.Views/Application/Sites/SiteCreate.cs b/CodeLiturgy.Views/Application/Sites/SiteCreate.cs
index 6cb904f..68185ce 100644
--- a/CodeLiturgy.Views/Application/Sites/SiteCreate.cs
+++ b/CodeLiturgy.Views/Application/Sites/SiteCreate.cs
@@ -2,7 +2,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application
{
- [MapFrom(typeof(Site))]
public partial class SiteCreate
{
public string Id { get; set; }
diff --git a/CodeLiturgy.Views/Application/Sites/SiteEnvironment.cs b/CodeLiturgy.Views/Application/Sites/SiteEnvironment.cs
index c61d1fd..e5b9f82 100644
--- a/CodeLiturgy.Views/Application/Sites/SiteEnvironment.cs
+++ b/CodeLiturgy.Views/Application/Sites/SiteEnvironment.cs
@@ -4,7 +4,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application
{
- [MapFrom(new [] {typeof(SiteEnvironmentCreate)})]
public partial class SiteEnvironment
{
diff --git a/CodeLiturgy.Views/Application/Sites/SiteEnvironmentCreate.cs b/CodeLiturgy.Views/Application/Sites/SiteEnvironmentCreate.cs
index 2dae3a3..c67eb5a 100644
--- a/CodeLiturgy.Views/Application/Sites/SiteEnvironmentCreate.cs
+++ b/CodeLiturgy.Views/Application/Sites/SiteEnvironmentCreate.cs
@@ -4,7 +4,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application
{
- [MapFrom(typeof(SiteEnvironment))]
public partial class SiteEnvironmentCreate
{
public string Name { get; set; }
diff --git a/CodeLiturgy.Views/Application/Sites/SiteEnvironmentUnique.cs b/CodeLiturgy.Views/Application/Sites/SiteEnvironmentUnique.cs
index 4f145e1..c7280e3 100644
--- a/CodeLiturgy.Views/Application/Sites/SiteEnvironmentUnique.cs
+++ b/CodeLiturgy.Views/Application/Sites/SiteEnvironmentUnique.cs
@@ -4,7 +4,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application
{
- [MapFrom(typeof(SiteEnvironment))]
public partial class SiteEnvironmentUnique
{
public string Id { get; set; }
diff --git a/CodeLiturgy.Views/Application/Sites/SiteUnique.cs b/CodeLiturgy.Views/Application/Sites/SiteUnique.cs
index d79d7ea..b614009 100644
--- a/CodeLiturgy.Views/Application/Sites/SiteUnique.cs
+++ b/CodeLiturgy.Views/Application/Sites/SiteUnique.cs
@@ -3,8 +3,6 @@ using MapTo;
namespace CodeLiturgy.Data.Application
{
-
- [MapFrom(typeof(Site))]
public partial class SiteUnique
{
public string Id { get; set; }
diff --git a/CodeLiturgy.Views/CodeLiturgy.Views.csproj b/CodeLiturgy.Views/CodeLiturgy.Views.csproj
index 5ced886..f599fbd 100644
--- a/CodeLiturgy.Views/CodeLiturgy.Views.csproj
+++ b/CodeLiturgy.Views/CodeLiturgy.Views.csproj
@@ -10,7 +10,6 @@
-
@@ -136,19 +135,12 @@
-
-
-
-
-
-
-
-
-
+
+
diff --git a/CodeLiturgy.Views/Controllers/AccountController.cs b/CodeLiturgy.Views/Controllers/AccountController.cs
index 24f9564..683fc49 100644
--- a/CodeLiturgy.Views/Controllers/AccountController.cs
+++ b/CodeLiturgy.Views/Controllers/AccountController.cs
@@ -7,7 +7,7 @@ using CodeLiturgy.Views.Utils;
namespace CodeLiturgy.Views.Controllers;
-public class AccountController : UserController
+public class AccountController : LoggedInUserController
{
public AccountController(
ApplicationUserManager userManager,
diff --git a/CodeLiturgy.Views/Controllers/ApacheController.cs b/CodeLiturgy.Views/Controllers/ApacheController.cs
index d791ce1..03a5d9e 100644
--- a/CodeLiturgy.Views/Controllers/ApacheController.cs
+++ b/CodeLiturgy.Views/Controllers/ApacheController.cs
@@ -15,7 +15,7 @@ namespace CodeLiturgy.Views.Controllers
[Authorize]
public class ApacheController : ControllerBase
{
- private ILogger _logger;
+ private ILogger _logger;
private readonly SiteDbContext _siteDbContext;
private readonly AugeasManager _augeasManager;
@@ -28,7 +28,7 @@ namespace CodeLiturgy.Views.Controllers
///
public ApacheController(
ApplicationUserManager userManager,
- ILogger logger,
+ ILogger logger,
SiteDbContext siteDbContext,
AugeasManager augeasManager)
{
diff --git a/CodeLiturgy.Views/Controllers/AuthController.cs b/CodeLiturgy.Views/Controllers/AuthController.cs
index c6e9116..d75b352 100644
--- a/CodeLiturgy.Views/Controllers/AuthController.cs
+++ b/CodeLiturgy.Views/Controllers/AuthController.cs
@@ -11,7 +11,7 @@ using Controller = Microsoft.AspNetCore.Mvc.Controller;
namespace CodeLiturgy.Views.Controllers
{
- public class AuthController : UserController
+ public class AuthController : LoggedInUserController
{
private readonly IAuthManager _authManager;
diff --git a/CodeLiturgy.Views/Controllers/EnvironmentController.cs b/CodeLiturgy.Views/Controllers/EnvironmentsApiController.cs
similarity index 61%
rename from CodeLiturgy.Views/Controllers/EnvironmentController.cs
rename to CodeLiturgy.Views/Controllers/EnvironmentsApiController.cs
index de91ddf..1e58322 100644
--- a/CodeLiturgy.Views/Controllers/EnvironmentController.cs
+++ b/CodeLiturgy.Views/Controllers/EnvironmentsApiController.cs
@@ -3,17 +3,18 @@ using CodeLiturgy.Data.Auth.Context.Users;
using CodeLiturgy.Domain;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
namespace CodeLiturgy.Views.Controllers
{
[ApiController]
[Authorize]
- public class EnvironmentController : ControllerBase
+ public class EnvironmentsApiController : ControllerBase
{
private ApplicationUserManager _userManager;
- private ILogger _logger;
+ private ILogger _logger;
private readonly SiteDbContext _siteDbContext;
- public EnvironmentController(ApplicationUserManager userManager, ILogger logger, SiteDbContext siteDbContext)
+ public EnvironmentsApiController(ApplicationUserManager userManager, ILogger logger, SiteDbContext siteDbContext)
{
_logger = logger;
_userManager = userManager;
@@ -22,17 +23,14 @@ namespace CodeLiturgy.Views.Controllers
[HttpGet("/api/environments")]
[ProducesResponseType(StatusCodes.Status200OK)]
- [ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
- public ActionResult GetEnvironments(
+ public async Task GetEnvironments(
int skip = 0, int take = 50, int orderDir = 1)
{
- var (success, sites) = _siteDbContext.GetEnvironments(skip, take, orderDir);
-
- if (!success) return new NotFoundResult();
-
+ var sites = _siteDbContext.Environments.Skip(skip).Take(take).ToListAsync();
+
return Ok(sites);
}
@@ -41,13 +39,16 @@ namespace CodeLiturgy.Views.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
- public ActionResult AddEnvironment(SiteEnvironmentCreate siteEnvironmentCreate)
+ public async Task AddEnvironment(SiteEnvironmentCreate siteEnvironmentCreate)
{
- var (success, result) = _siteDbContext.AddSiteEnvironment(siteEnvironmentCreate);
+ var newEnvironment= new SiteEnvironment();
+ newEnvironment.Name = siteEnvironmentCreate.Name;
+ _siteDbContext.Environments.Add(newEnvironment);
+ var success = await _siteDbContext.SaveChangesAsync() >= 0;
if (success)
{
- return Ok(result);
+ return Ok(newEnvironment);
}
return BadRequest();
@@ -64,11 +65,11 @@ namespace CodeLiturgy.Views.Controllers
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[HttpGet("/api/environments/{environmentId}", Name = nameof(GetEnvironmentById))]
- public ActionResult GetEnvironmentById(string siteId)
+ public async Task GetEnvironmentById(string siteId)
{
- var (success, environment) = _siteDbContext.GetOneSiteById(siteId);
+ var environment = await _siteDbContext.Environments.Where(x => x.Id == siteId).FirstOrDefaultAsync();
- if (success)
+ if (environment != null)
{
return Ok(environment);
}
diff --git a/CodeLiturgy.Views/Controllers/EnvironmentsPageController.cs b/CodeLiturgy.Views/Controllers/EnvironmentsController.cs
similarity index 81%
rename from CodeLiturgy.Views/Controllers/EnvironmentsPageController.cs
rename to CodeLiturgy.Views/Controllers/EnvironmentsController.cs
index 6c6155f..48b3e7f 100644
--- a/CodeLiturgy.Views/Controllers/EnvironmentsPageController.cs
+++ b/CodeLiturgy.Views/Controllers/EnvironmentsController.cs
@@ -6,11 +6,11 @@ using Microsoft.AspNetCore.Mvc;
namespace CodeLiturgy.Views.Controllers;
-public class EnvironmentsPageController : UserController
+public class EnvironmentsController : LoggedInUserController
{
- public EnvironmentsPageController(
+ public EnvironmentsController(
ApplicationUserManager userManager,
- ILogger logger)
+ ILogger logger)
: base(userManager, logger) { }
public override void OnInitialization()
diff --git a/CodeLiturgy.Views/Controllers/HomeController.cs b/CodeLiturgy.Views/Controllers/HomeController.cs
index 03f411d..55b7ca4 100644
--- a/CodeLiturgy.Views/Controllers/HomeController.cs
+++ b/CodeLiturgy.Views/Controllers/HomeController.cs
@@ -7,7 +7,7 @@ namespace CodeLiturgy.Views.Controllers;
[System.Web.Mvc.Route("/")]
[System.Web.Mvc.Authorize]
-public class HomeController : UserController
+public class HomeController : LoggedInUserController
{
public HomeController(
ApplicationUserManager userManager,
diff --git a/CodeLiturgy.Views/Controllers/UserController.cs b/CodeLiturgy.Views/Controllers/LoggedInUserController.cs
similarity index 82%
rename from CodeLiturgy.Views/Controllers/UserController.cs
rename to CodeLiturgy.Views/Controllers/LoggedInUserController.cs
index 0aba5fd..65cc27b 100644
--- a/CodeLiturgy.Views/Controllers/UserController.cs
+++ b/CodeLiturgy.Views/Controllers/LoggedInUserController.cs
@@ -10,15 +10,18 @@ using Microsoft.AspNetCore.Mvc;
namespace CodeLiturgy.Views.Controllers;
-public class UserController : Controller
+///
+/// Base controller class for Views.
+///
+public class LoggedInUserController : Controller
{
- protected ILogger _logger;
+ protected ILogger _logger;
protected ApplicationUserManager _userManager;
private List _footerMenu;
private List _headerMenu;
- public UserController(ApplicationUserManager userManager, ILogger logger)
+ public LoggedInUserController(ApplicationUserManager userManager, ILogger logger)
{
_logger = logger;
_userManager = userManager;
@@ -76,7 +79,15 @@ public class UserController : Controller
ApplicationUser user = await _userManager.GetUserAsync(User);
if (user != null)
{
- return new ApplicationUserUnique(user);
+ var dto = new ApplicationUserUnique()
+ {
+ Email = user.Email,
+ EmailConfirmed = user.EmailConfirmed,
+ NormalizedEmail = user.NormalizedEmail,
+ UserName = user.UserName,
+ LockoutEnabled = user.LockoutEnabled
+ };
+ return dto;
}
}
diff --git a/CodeLiturgy.Views/Controllers/SitesApiController.cs b/CodeLiturgy.Views/Controllers/SitesApiController.cs
new file mode 100644
index 0000000..a1dacfa
--- /dev/null
+++ b/CodeLiturgy.Views/Controllers/SitesApiController.cs
@@ -0,0 +1,119 @@
+using CodeLiturgy.Data.Auth.Context.Users;
+using CodeLiturgy.Data.Application;
+using CodeLiturgy.Domain;
+using CodeLiturgy.Views.Augeas;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
+
+
+namespace CodeLiturgy.Views.Controllers
+{
+ ///
+ /// Controller responsible for managing websites.
+ ///
+ [Route("api/sites")]
+ [ApiController]
+ [Authorize]
+
+ public class SitesApiController : ControllerBase
+ {
+ private ApplicationUserManager _userManager;
+ private ILogger _logger;
+ private readonly SiteDbContext _siteDbContext;
+ private readonly AugeasManager _augeasManager;
+
+ ///
+ /// Sites controller constructor.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public SitesApiController(
+ ApplicationUserManager userManager,
+ ILogger logger,
+ SiteDbContext siteDbContext,
+ AugeasManager augeasManager)
+ {
+ _logger = logger;
+ _userManager = userManager;
+ _siteDbContext = siteDbContext;
+ _augeasManager = augeasManager;
+ }
+
+ ///
+ /// Gets the sites stored in the database.
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status401Unauthorized)]
+
+ public async Task GetSites(
+
+ int skip = 0, int take = 50, int orderDir = 1)
+ {
+ var result = await _siteDbContext
+ .Sites.Skip(skip)
+ .Take(take)
+ .ToListAsync();
+
+ return Ok(result);
+ }
+
+ ///
+ /// Gets a site by Id.
+ ///
+ /// Site id.
+ ///
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status404NotFound)]
+ [ProducesResponseType(StatusCodes.Status403Forbidden)]
+
+ [HttpGet("{siteId}", Name = nameof(GetSiteById))]
+ public async Task GetSiteById(string siteId)
+ {
+ var site = await _siteDbContext.Sites.Where(x => x.Id == siteId).FirstOrDefaultAsync();
+
+ if (site != null)
+ {
+ return Ok(site);
+ }
+
+ return new NotFoundResult();
+ }
+
+
+ ///
+ /// Adds a site to the database.
+ ///
+ ///
+ ///
+ [ProducesResponseType(StatusCodes.Status201Created)]
+ [ProducesResponseType(StatusCodes.Status406NotAcceptable)]
+ [HttpPost]
+ public async Task AddSite(SiteCreate siteToCreate)
+ {
+ var site = new Site()
+ {
+ Domain = siteToCreate.Domain,
+ CreatedDate = DateTime.Today,
+ SiteType = siteToCreate.SiteType
+
+ };
+
+ _siteDbContext.Sites.Add(site);
+
+ var success = await _siteDbContext.SaveChangesAsync() >= 0;
+ if (!success) return new BadRequestResult();
+ return CreatedAtRoute(nameof(GetSiteById), new {Id = site.Id}, site);
+ }
+
+
+ }
+}
+
diff --git a/CodeLiturgy.Views/Controllers/SitesController.cs b/CodeLiturgy.Views/Controllers/SitesController.cs
index f9c10e6..ae2aa7e 100644
--- a/CodeLiturgy.Views/Controllers/SitesController.cs
+++ b/CodeLiturgy.Views/Controllers/SitesController.cs
@@ -1,108 +1,12 @@
-using CodeLiturgy.Data.Auth.Context.Users;
-using CodeLiturgy.Data.Application;
-using CodeLiturgy.Domain;
-using CodeLiturgy.Views.Augeas;
-using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+namespace CodeLiturgy.Views.Controllers;
-namespace CodeLiturgy.Views.Controllers
+public class SitesController : Controller
{
- ///
- /// Controller responsible for managing websites.
- ///
- [Route("api/sites")]
- [ApiController]
- [Authorize]
-
- public class SitesController : ControllerBase
+ // GET
+ public IActionResult Index()
{
- private ApplicationUserManager _userManager;
- private ILogger _logger;
- private readonly SiteDbContext _siteDbContext;
- private readonly AugeasManager _augeasManager;
-
- ///
- /// Sites controller constructor.
- ///
- ///
- ///
- ///
- ///
- public SitesController(
- ApplicationUserManager userManager,
- ILogger logger,
- SiteDbContext siteDbContext,
- AugeasManager augeasManager)
- {
- _logger = logger;
- _userManager = userManager;
- _siteDbContext = siteDbContext;
- _augeasManager = augeasManager;
- }
-
- ///
- /// Gets the sites stored in the database.
- ///
- ///
- ///
- ///
- ///
- [HttpGet]
- [ProducesResponseType(StatusCodes.Status200OK)]
- [ProducesResponseType(StatusCodes.Status404NotFound)]
- [ProducesResponseType(StatusCodes.Status401Unauthorized)]
-
- public ActionResult GetSites(
-
- int skip = 0, int take = 50, int orderDir = 1)
- {
- var (success, sites) = _siteDbContext.GetSites(skip, take, orderDir);
-
- if (!success) return new NotFoundResult();
-
- return Ok(sites);
- }
-
- ///
- /// Gets a site by Id.
- ///
- /// Site id.
- ///
- [ProducesResponseType(StatusCodes.Status200OK)]
- [ProducesResponseType(StatusCodes.Status404NotFound)]
- [ProducesResponseType(StatusCodes.Status403Forbidden)]
-
- [HttpGet("{siteId}", Name = nameof(GetSiteById))]
- public ActionResult GetSiteById(string siteId)
- {
- var (success, site) = _siteDbContext.GetOneSiteById(siteId);
-
- if (success)
- {
- return Ok(site);
- }
-
- return new NotFoundResult();
- }
-
-
- ///
- /// Adds a site to the database.
- ///
- ///
- ///
- [ProducesResponseType(StatusCodes.Status201Created)]
- [ProducesResponseType(StatusCodes.Status406NotAcceptable)]
- [HttpPost]
- public ActionResult AddSite(SiteCreate siteToCreate)
- {
- var (success, site) = _siteDbContext.AddSite(siteToCreate);
- if (!success) return new BadRequestResult();
- return CreatedAtRoute(nameof(GetSiteById), new {countryId = site.Id}, site);
- }
-
-
+ return View();
}
-}
-
+}
\ No newline at end of file
diff --git a/CodeLiturgy.Views/Controllers/System/SystemController.cs b/CodeLiturgy.Views/Controllers/System/SystemController.cs
index 5dc6d2a..d3f6629 100644
--- a/CodeLiturgy.Views/Controllers/System/SystemController.cs
+++ b/CodeLiturgy.Views/Controllers/System/SystemController.cs
@@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc;
namespace CodeLiturgy.Views.Controllers
{
- public class SystemController : UserController
+ public class SystemController : LoggedInUserController
{
public SystemController(ApplicationUserManager userManager, ILogger logger) : base(userManager, logger)
{
diff --git a/CodeLiturgy.Views/DbContexts/ApplicationUserDbContext.cs b/CodeLiturgy.Views/DbContexts/ApplicationUserDbContext.cs
index e8ac632..5f28712 100644
--- a/CodeLiturgy.Views/DbContexts/ApplicationUserDbContext.cs
+++ b/CodeLiturgy.Views/DbContexts/ApplicationUserDbContext.cs
@@ -9,7 +9,6 @@ namespace CodeLiturgy.Domain
///
/// Application User Db Context
///
- [EfGenerator]
public class ApplicationUserDbContext : IdentityDbContext<
ApplicationUser,
ApplicationRole,
@@ -21,23 +20,17 @@ namespace CodeLiturgy.Domain
ApplicationUserToken>
{
///
- [EfGetMany(typeof(ApplicationUserClaimUnique))]
public sealed override DbSet UserClaims { get; set; }
///
- [EfGetMany(typeof(ApplicationUserRoleUnique))]
public sealed override DbSet UserRoles { get; set; }
///
- [EfGetMany(typeof(ApplicationRoleUnique))]
public sealed override DbSet Roles { get; set; }
///
- [EfGetMany(typeof(ApplicationRoleClaimUnique))]
public sealed override DbSet RoleClaims { get; set; }
- [EfGetMany(typeof(ApplicationUserUnique))]
- [EfUpdateMethods( updateType: typeof(ApplicationUserUnique), returnType: typeof(ApplicationUserUnique), keyPropertyMemberName: nameof(ApplicationUserUnique.Id))]
public sealed override DbSet Users { get; set; }
///
diff --git a/CodeLiturgy.Views/DbContexts/SiteDbContext.cs b/CodeLiturgy.Views/DbContexts/SiteDbContext.cs
index 6cfcb8a..934abe6 100644
--- a/CodeLiturgy.Views/DbContexts/SiteDbContext.cs
+++ b/CodeLiturgy.Views/DbContexts/SiteDbContext.cs
@@ -5,20 +5,12 @@ using CodeLiturgy.Domain.Model;
namespace CodeLiturgy.Domain
{
- [EfGenerator]
public class SiteDbContext: DbContext
{
- [EfGetOneBy(nameof(Site.Id), typeof(SiteUnique))]
- [EfGetOne(typeof(SiteUnique))]
- [EfGetMany(typeof(SiteUnique))]
- [EfAddMethods(typeof(SiteCreate), typeof(SiteUnique))]
+
public DbSet Sites { get; set; }
-
- [EfGetOneBy(nameof(SiteEnvironment.Id), typeof(SiteEnvironmentUnique))]
- [EfGetOne(typeof(SiteEnvironmentUnique))]
- [EfGetMany(typeof(SiteEnvironmentUnique))]
- [EfAddMethods(typeof(SiteEnvironmentCreate), typeof(SiteEnvironmentUnique))]
+
public DbSet Environments { get; set; }
///
diff --git a/CodeLiturgy.Views/Pages/Sites/Index.cshtml b/CodeLiturgy.Views/Pages/Sites/Index.cshtml
new file mode 100644
index 0000000..64fcda5
--- /dev/null
+++ b/CodeLiturgy.Views/Pages/Sites/Index.cshtml
@@ -0,0 +1,18 @@
+@model dynamic
+
+@{
+ Layout = null;
+}
+
+
+
+
+
+ title
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CodeLiturgy.Views/RazorUtils/LayoutCache.cs b/CodeLiturgy.Views/RazorUtils/LayoutCache.cs
index 623eb4e..5b1672b 100644
--- a/CodeLiturgy.Views/RazorUtils/LayoutCache.cs
+++ b/CodeLiturgy.Views/RazorUtils/LayoutCache.cs
@@ -22,6 +22,11 @@ internal class LayoutCache
RootLocation,
nameof(HomeController),
new List()
+ {
+ new RouteRecord("Environments", "envs0", "environments", nameof(EnvironmentsApiController), new List()),
+ new RouteRecord("Standalone Sites", "sites0", "sites", nameof(SitesApiController), new List()),
+
+ }
, ViewType.Root);
#endregion Route Tree
@@ -43,12 +48,19 @@ internal class LayoutCache
{
var menuToShow = new List();
+ // Add Root URL
menuToShow.Add(Root.ToUrl());
if (!userAuthenticated)
{
return menuToShow;
}
+
+ var rootChildrenUrls = Root.Children.Select(x => x.ToUrl()).ToList();
+
+ menuToShow = menuToShow
+ .Concat(rootChildrenUrls)
+ .ToList();
if (dictionary[HeaderMenuId] is List headerMenu)
{
diff --git a/CodeLiturgy.Views/RazorUtils/RouteRecord.cs b/CodeLiturgy.Views/RazorUtils/RouteRecord.cs
index 428306f..1098fa3 100644
--- a/CodeLiturgy.Views/RazorUtils/RouteRecord.cs
+++ b/CodeLiturgy.Views/RazorUtils/RouteRecord.cs
@@ -1,19 +1,46 @@
namespace CodeLiturgy.Views.Utils
{
+ ///
+ /// Url container.
+ ///
public class Url
{
- public string Name;
- public string Location;
+ ///
+ /// Name of the URL
+ ///
+ public readonly string Name;
+ ///
+ /// Location of the URL (URI).
+ ///
+ public readonly string Location;
+ ///
+ /// Url constructor.
+ ///
+ /// Name of the URL
+ /// Location of the URL (URI).
public Url(string name, string location)
{
Name = name;
Location = location;
}
}
+ ///
+ /// A record representing a main view on the site
+ ///
+ /// The name of the view
+ /// A unique key for this view.
+ /// The unique URL for this view.
+ /// Controller name.
+ /// Children views of this view.
+ /// Type of this view.
public record RouteRecord(string Name, string RouteKey, string Location, string ControllerName, List Children, ViewType ViewType = ViewType.Undefined)
{
+ ///
+ /// Children to Url List.
+ ///
+ ///
public List ChildrenToUrl()
{
return Children.Select(x => x.ToUrl()).ToList();
diff --git a/CodeLiturgy.Views/RazorUtils/ViewType.cs b/CodeLiturgy.Views/RazorUtils/ViewType.cs
index 07eab08..edfa027 100644
--- a/CodeLiturgy.Views/RazorUtils/ViewType.cs
+++ b/CodeLiturgy.Views/RazorUtils/ViewType.cs
@@ -9,7 +9,6 @@ namespace CodeLiturgy.Views
Environments,
Root,
Undefined
-
}
}
diff --git a/CodeLiturgy.Views/Templates/AddToListTemplate.csx b/CodeLiturgy.Views/Templates/AddToListTemplate.csx
deleted file mode 100644
index 58a1797..0000000
--- a/CodeLiturgy.Views/Templates/AddToListTemplate.csx
+++ /dev/null
@@ -1,26 +0,0 @@
-///
-/// Adds a new item into {listPropertyName} from {entityTypeName}.
-///
-/// The database context.
-/// The {entityTypeName} key to get
-/// The item to add to {listPropertyName}.
-/// The success of the operation, a message, and a projection of the added item.
-public static (bool, string, {returnTypeFullName}) Add{listEntityTypeName}To{entityTypeName}(this {contextFullName} dbContext,
- {primaryKeyFullName} {primaryKeyVarName}, {listEntityCreateFullName} {listItemCreateVarName})
-{
- var entityQuery = from aEntity in dbContext.{propertyName}
- where aEntity.{primaryKeyPropertyName} == {primaryKeyVarName}
- let itemsInList = aEntity.{listPropertyName}
- select aEntity;
-
- var entity = entityQuery.FirstOrDefault();
-
- if (entity == null) return (false, $"{entityTypeName} Not found.", null);
-
- var newListItem = new {listEntityFullName}({listItemCreateVarName});
- entity.{listPropertyName}.Add(newListItem);
- var success = dbContext.SaveChanges() >= 0;
-
- return !success ? (false, "Error saving changes in the Database. Action: Create {listEntityTypeName} in {entityTypeName}.", null) :
- (true, string.Empty, new {returnTypeFullName}(newListItem));
-}
\ No newline at end of file
diff --git a/CodeLiturgy.Views/Templates/AddToTemplate.csx b/CodeLiturgy.Views/Templates/AddToTemplate.csx
deleted file mode 100644
index 1ab2465..0000000
--- a/CodeLiturgy.Views/Templates/AddToTemplate.csx
+++ /dev/null
@@ -1,13 +0,0 @@
-///
-/// Adds a new {entityTypeName} and returns a projection of type {returnTypeFullName}.
-///
-/// The database context.
-/// Projection data of {entityTypeName}
-/// The added data.
-public static (bool, {returnTypeFullName}) Add{entityTypeName}(this {contextFullName} dbContext, {createTypeFullName} {toCreateVarName})
-{
- var {newEntityVarName} = new {entityTypeFullName}({toCreateVarName});
- dbContext.{propertyName}.Add({newEntityVarName});
- var success = dbContext.SaveChanges() >= 0;
- return (success, new {returnTypeFullName}({newEntityVarName}));
-}
diff --git a/CodeLiturgy.Views/Templates/GetListTemplate.csx b/CodeLiturgy.Views/Templates/GetListTemplate.csx
deleted file mode 100644
index 5eab601..0000000
--- a/CodeLiturgy.Views/Templates/GetListTemplate.csx
+++ /dev/null
@@ -1,33 +0,0 @@
-///
-/// Gets {listPropertyName} in {entityTypeName}.
-///
-/// The database context.
-/// The {entityTypeName} key to get
-/// How many {propertyName} to skip.
-/// How many {propertyName} to take. (Default = 50)
-/// Optional Order direction
-/// Optional order by predicate.
-/// A bool if there's at least one record found and the resulting array.
-public static (bool, {returnTypeFullName}[]) Get{entityTypeName}{listPropertyName}(this {contextFullName} dbContext, {primaryKeyFullName} {primaryKeyVarName},
- int skip = 0, int take = 50, int orderDir = 1,
- Expression> orderBy = null)
-{
- var {entityObjectVarName} = dbContext.{propertyName}.FirstOrDefault(d => d.{primaryKeyPropertyName} == {primaryKeyVarName});
-
- if ({entityObjectVarName} == null) return (false, null);
-
- var currentTake = take;
- if (take > 200) currentTake = 200;
-
- var query = dbContext
- .{propertyName}
- .Where(data => data.{primaryKeyPropertyName} == {primaryKeyVarName})
- .SelectMany(o => o.{listPropertyName})
- .Select(x => new {returnTypeFullName}(x))
- .Skip(skip)
- .Take(currentTake);
-
- if(orderBy != null) query = orderDir == 1 ? query.OrderBy(orderBy) : query.OrderByDescending(orderBy);
-
- return (query.Any(), query.ToArray());
-}
\ No newline at end of file
diff --git a/CodeLiturgy.Views/Templates/GetManyTemplate.csx b/CodeLiturgy.Views/Templates/GetManyTemplate.csx
deleted file mode 100644
index c5ae4ff..0000000
--- a/CodeLiturgy.Views/Templates/GetManyTemplate.csx
+++ /dev/null
@@ -1,25 +0,0 @@
-///
-/// Gets {propertyName}.
-///
-/// The database context.
-/// How many {propertyName} to skip.
-/// How many {propertyName} to take. (Default = 50)
-/// Optional Order direction
-/// Optional where predicate.
-/// Optional order by predicate.
-/// A bool if the result is successful and a projection of the first occurrence of {propertyName}.
-public static (bool, System.Collections.Generic.List<{returnTypeFullName}>) Get{propertyName}(this {contextFullName} dbContext, int skip = 0, int take = 50, int orderDir = 1)
-{
- if (take > 200) take = 200;
-
- var query = dbContext
- .{propertyName}
- .Skip(skip)
- .Take(take)
- .Select(x => new {returnTypeFullName}(x));
-
-
- var result = query.ToList();
-
- return (result.Any(), result);
-}
\ No newline at end of file
diff --git a/CodeLiturgy.Views/Templates/GetOneByTemplate.csx b/CodeLiturgy.Views/Templates/GetOneByTemplate.csx
deleted file mode 100644
index 9c7837e..0000000
--- a/CodeLiturgy.Views/Templates/GetOneByTemplate.csx
+++ /dev/null
@@ -1,15 +0,0 @@
-///
-/// Gets the first result in the table, and returns a projection of
-///
-/// The database context.
-/// By {byParamPropertyName} parameter type.
-/// A projection of {entityTypeName}>
-public static (bool, {returnTypeFullName}) GetOne{entityTypeName}By{byParamPropertyName} (this {contextFullName} dbContext, {byParamFullType} {byParamVarName})
-{
- var {findEntityVarName} = dbContext.{propertyName}
- .Where(x => x.{byParamPropertyName} == {byParamVarName})
- .Select(x => new {returnTypeFullName}(x))
- .FirstOrDefault();
-
- return ({findEntityVarName} != null, {findEntityVarName});
-}
\ No newline at end of file
diff --git a/CodeLiturgy.Views/Templates/GetOneFromListTemplate.csx b/CodeLiturgy.Views/Templates/GetOneFromListTemplate.csx
deleted file mode 100644
index e3044e2..0000000
--- a/CodeLiturgy.Views/Templates/GetOneFromListTemplate.csx
+++ /dev/null
@@ -1,20 +0,0 @@
-///
-/// Gets a projection of the first {listItemTypeName} occurrence.
-///
-/// The Database context.
-/// {entityTypeName} lookup key.
-/// {listItemTypeName} lookup key.
-/// A projection of {listItemTypeName}
-public static (bool, {returnTypeFullName}) Get{listItemTypeName}From{entityTypeName} (this {contextFullName} dbContext, {primaryKeyFullName} {primaryKeyVarName},
- {listPrimaryKeyFullName} {listPrimaryKeyVarName})
-{
- var query =
- from mainEntity in dbContext.{propertyName}
- where mainEntity.{primaryKeyPropertyName} == {primaryKeyVarName}
- let list = mainEntity.{listPropertyName}
- from listItem in list
- where listItem.{listPrimaryKeyPropertyName} == {listPrimaryKeyVarName}
- select new {returnTypeFullName}(listItem);
-
- return (query.Any(), query.FirstOrDefault());
-}
diff --git a/CodeLiturgy.Views/Templates/GetOneTemplate.csx b/CodeLiturgy.Views/Templates/GetOneTemplate.csx
deleted file mode 100644
index 0436400..0000000
--- a/CodeLiturgy.Views/Templates/GetOneTemplate.csx
+++ /dev/null
@@ -1,17 +0,0 @@
-///
-/// Gets the first result following the query with a expression.
-///
-/// The database context.
-/// FirstOrDefault argument to pass.
-/// A bool if the first occurrence of {returnTypeName} is returned.
-public static (bool, {returnTypeFullName}) Get{entityTypeName}With (this {contextFullName} dbContext,
- Expression> with)
-{
- var {findEntityVarName} =
- dbContext.{propertyName}
- .Select(x => new {returnTypeFullName}(x))
- .FirstOrDefault(with);
-
- return ({findEntityVarName} != null, {findEntityVarName});
-
-}
\ No newline at end of file
diff --git a/CodeLiturgy.Views/Templates/UpdateTemplate.csx b/CodeLiturgy.Views/Templates/UpdateTemplate.csx
deleted file mode 100644
index 99cb497..0000000
--- a/CodeLiturgy.Views/Templates/UpdateTemplate.csx
+++ /dev/null
@@ -1,16 +0,0 @@
-///
-/// Updates {entityTypeName} in the DbSet of .
-///
-/// Database context
-/// The data type with the add data to update {entityTypeName}
-/// The primary key.
-/// Returns the current data.
-public static (bool, {returnTypeFullName}) Update{entityTypeName}( this {contextFullName} dbContext, {updateTypeFullName} {updateVarName}, {keyTypeFullName} {keyVarName})
-{
- var {existingEntityVarName} = dbContext.{propertyName}.FirstOrDefault(x => x.{keyPropertyName} == {keyVarName});
- if ({existingEntityVarName} == null) return (false, null);
- {existingEntityVarName}.Update({updateVarName});
- dbContext.{propertyName}.Update({existingEntityVarName});
- var result = dbContext.SaveChanges() >= 0;
- return (result, new {returnTypeFullName}({existingEntityVarName}));
-}
\ No newline at end of file
diff --git a/CodeLiturgy.Views/Views/Environments/Index.cshtml b/CodeLiturgy.Views/Views/Environments/Index.cshtml
new file mode 100644
index 0000000..302373e
--- /dev/null
+++ b/CodeLiturgy.Views/Views/Environments/Index.cshtml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/CodeLiturgy.Views/Views/EnvironmentsPage/Index.cshtml b/CodeLiturgy.Views/Views/EnvironmentsPage/Index.cshtml
deleted file mode 100644
index 83b0252..0000000
--- a/CodeLiturgy.Views/Views/EnvironmentsPage/Index.cshtml
+++ /dev/null
@@ -1,4 +0,0 @@
-@*
-*@
-
-
diff --git a/CodeLiturgy.Views/Views/Shared/_HeaderMenu.cshtml b/CodeLiturgy.Views/Views/Shared/_HeaderMenu.cshtml
index 0f4a0e0..b840cde 100644
--- a/CodeLiturgy.Views/Views/Shared/_HeaderMenu.cshtml
+++ b/CodeLiturgy.Views/Views/Shared/_HeaderMenu.cshtml
@@ -1,35 +1,42 @@
@using CodeLiturgy.Views.Utils
@using CodeLiturgy.Data.Auth
@using Duende.IdentityServer.Extensions
+@using Microsoft.Extensions.Hosting.Internal
@{
Layout = null;
var userAuthenticated = User.IsAuthenticated();
var user = ViewData.GetUserViewData();
var rootUrl = SessionConstants.CookieDomain;
var menu = LayoutCache.GetDefaultHeaderMenu(ViewData, User.IsAuthenticated());
+ var isDevelopment = false;
+ #if DEBUG
+ isDevelopment = true;
+ #endif
}
\n{/if}\n\n\n","import App from './App.svelte'\n\nconst app = new App({\n target: document.getElementById('app')\n})\n\nexport default app\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","noop","run","fn","blank_object","run_all","fns","is_function","thing","safe_not_equal","a","b","is_empty","obj","append","target","insert","anchor","detach","destroy_each","iterations","detaching","element","name","text","data","space","empty","listen","event","handler","options","attr","attribute","value","children","set_data","set_input_value","input","set_style","key","important","select_option","select","option","select_value","selected_option","custom_event","type","detail","bubbles","cancelable","e","current_component","set_current_component","component","get_current_component","createEventDispatcher","callbacks","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","update_scheduled","schedule_update","flush","add_render_callback","seen_callbacks","flushidx","saved_component","update","i","callback","$$","dirty","outroing","outros","group_outros","check_outros","transition_in","block","local","transition_out","create_component","mount_component","customElement","fragment","after_update","new_on_destroy","destroy_component","make_dirty","init","instance","create_fragment","not_equal","props","append_styles","parent_component","ready","ret","rest","nodes","SvelteComponent","index","$$props","i0","i1","ctx","div","span","t_value","t","option0","option1","option2","create_if_block_1","t3_value","div2","div0","span0","div1","span1","t3","t1_value","t4_value","t1","t4","create_if_block_4","create_if_block_3","create_if_block_2","create_if_block","div4","div3","site","editMode","expandContent","onSiteDataClicked","item","$$invalidate","dispatch","removeEvent","editEvent","saveEvent","click_handler","click_handler_1","change_handler","each_value","each_blocks","div5","environment","siteID","onAddSiteClicked","t0_value","h4","current","t0","expanded","onExpandClicked","environments","subscriber_queue","writable","start","stop","subscribers","set","new_value","run_queue","subscriber","subscribe","invalidate","exampleSitesStore","environmentsStore","currentEnvironmentStore","nav","button0","label","button1","button2","currentEnvironment","x","createModal","exampleSites","onCreateEnvironmentClicked","onEnvironmentAdded","onModalCloseClicked","onRemoveSiteClicked","newArr","App"],"mappings":"CAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CAC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