-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Resolve conflicts with first version
- Loading branch information
Showing
4 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/VirtoCommerce.GDPR.Data/Repositories/GDPRModuleDbContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
24
src/VirtoCommerce.GDPR.Web/Controllers/Api/GDPRModuleController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" }); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}]); |