Skip to content

Commit

Permalink
fix: Resolve conflicts with first version
Browse files Browse the repository at this point in the history
  • Loading branch information
akak1977 committed Nov 12, 2021
2 parents 31d249c + efcfaca commit fd8758f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/VirtoCommerce.GDPR.Data/Repositories/GDPRModuleDbContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using EntityFrameworkCore.Triggers;
using Microsoft.EntityFrameworkCore;

namespace VirtoCommerce.GDPR.Data.Repositories
{
public class GDPRModuleDbContext : DbContextWithTriggers
{
public GDPRModuleDbContext(DbContextOptions<GDPRModuleDbContext> options)
: base(options)
{
}

protected GDPRModuleDbContext(DbContextOptions options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
// modelBuilder.Entity<GDPRModuleEntity>().ToTable("MyModule").HasKey(x => x.Id);
// modelBuilder.Entity<GDPRModuleEntity>().Property(x => x.Id).HasMaxLength(128);
// base.OnModelCreating(modelBuilder);
}
}
}

24 changes: 24 additions & 0 deletions src/VirtoCommerce.GDPR.Web/Controllers/Api/GDPRModuleController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using VirtoCommerce.GDPR.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;


namespace VirtoCommerce.GDPR.Web.Controllers.Api
{
[Route("api/GDPRModule")]
public class GDPRModuleController : Controller
{
// GET: api/VirtoCommerce.GDPR
/// <summary>
/// Get message
/// </summary>
/// <remarks>Return "Hello world!" message</remarks>
[HttpGet]
[Route("")]
[Authorize(ModuleConstants.Security.Permissions.Read)]
public ActionResult<string> Get()
{
return Ok(new { result = "Hello world!" });
}
}
}
7 changes: 7 additions & 0 deletions src/VirtoCommerce.GDPR.Web/Scripts/blades/hello-world.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="blade-content">
<div class="blade-inner">
<div class="inner-block">
<div class="sub-t">{{blade.data}}</div>
</div>
</div>
</div>
15 changes: 15 additions & 0 deletions src/VirtoCommerce.GDPR.Web/Scripts/blades/hello-world.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
angular.module('GDPRModule')
.controller('GDPRModule.helloWorldController', ['$scope', 'GDPRModule.webApi', function ($scope, api) {
var blade = $scope.blade;
blade.title = 'GDPRModule';

blade.refresh = function () {
api.get(function (data) {
blade.title = 'GDPRModule.blades.hello-world.title';
blade.data = data.result;
blade.isLoading = false;
});
};

blade.refresh();
}]);

0 comments on commit fd8758f

Please sign in to comment.