Skip to content

Commit c96f65b

Browse files
authored
Bugfix/first time user error (#58)
* remove unused UserService
1 parent ef2f5c1 commit c96f65b

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

Cite.Api/Cite.Api.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<Version>1.8.0</Version>
3+
<Version>1.8.1</Version>
44
<TargetFramework>net8.0</TargetFramework>
55
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
66
<NoWarn>CS1591</NoWarn>

Cite.Api/Infrastructure/EventHandlers/UserHandler.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@ namespace Cite.Api.Infrastructure.EventHandlers
1818
{
1919
public class UserHandler
2020
{
21-
protected readonly CiteContext _db;
2221
protected readonly IMapper _mapper;
23-
protected readonly IUserService _UserService;
2422
protected readonly IHubContext<MainHub> _mainHub;
2523

2624
public UserHandler(
27-
CiteContext db,
2825
IMapper mapper,
29-
IUserService UserService,
3026
IHubContext<MainHub> mainHub)
3127
{
32-
_db = db;
3328
_mapper = mapper;
34-
_UserService = UserService;
3529
_mainHub = mainHub;
3630
}
3731

@@ -67,10 +61,8 @@ protected async Task HandleCreateOrUpdate(
6761
public class UserCreatedSignalRHandler : UserHandler, INotificationHandler<EntityCreated<UserEntity>>
6862
{
6963
public UserCreatedSignalRHandler(
70-
CiteContext db,
7164
IMapper mapper,
72-
IUserService userService,
73-
IHubContext<MainHub> mainHub) : base(db, mapper, userService, mainHub) { }
65+
IHubContext<MainHub> mainHub) : base(mapper, mainHub) { }
7466

7567
public async Task Handle(EntityCreated<UserEntity> notification, CancellationToken cancellationToken)
7668
{
@@ -81,10 +73,8 @@ public async Task Handle(EntityCreated<UserEntity> notification, CancellationTok
8173
public class UserUpdatedSignalRHandler : UserHandler, INotificationHandler<EntityUpdated<UserEntity>>
8274
{
8375
public UserUpdatedSignalRHandler(
84-
CiteContext db,
8576
IMapper mapper,
86-
IUserService userService,
87-
IHubContext<MainHub> mainHub) : base(db, mapper, userService, mainHub) { }
77+
IHubContext<MainHub> mainHub) : base(mapper, mainHub) { }
8878

8979
public async Task Handle(EntityUpdated<UserEntity> notification, CancellationToken cancellationToken)
9080
{
@@ -99,10 +89,8 @@ await base.HandleCreateOrUpdate(
9989
public class UserDeletedSignalRHandler : UserHandler, INotificationHandler<EntityDeleted<UserEntity>>
10090
{
10191
public UserDeletedSignalRHandler(
102-
CiteContext db,
10392
IMapper mapper,
104-
IUserService userService,
105-
IHubContext<MainHub> mainHub) : base(db, mapper, userService, mainHub)
93+
IHubContext<MainHub> mainHub) : base(mapper, mainHub)
10694
{
10795
}
10896

Cite.Api/Infrastructure/EventHandlers/UserPermissionHandler.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public class BaseUserPermissionHandler
2525
public BaseUserPermissionHandler(
2626
CiteContext db,
2727
IMapper mapper,
28-
IUserService userService,
2928
IHubContext<MainHub> mainHub)
3029
{
3130
_db = db;
@@ -69,8 +68,7 @@ public class UserPermissionCreatedSignalRHandler : BaseUserPermissionHandler, IN
6968
public UserPermissionCreatedSignalRHandler(
7069
CiteContext db,
7170
IMapper mapper,
72-
IUserService userPermissionService,
73-
IHubContext<MainHub> mainHub) : base(db, mapper, userPermissionService, mainHub) { }
71+
IHubContext<MainHub> mainHub) : base(db, mapper, mainHub) { }
7472

7573
public async Task Handle(EntityCreated<UserPermissionEntity> notification, CancellationToken cancellationToken)
7674
{
@@ -83,8 +81,7 @@ public class UserPermissionDeletedSignalRHandler : BaseUserPermissionHandler, IN
8381
public UserPermissionDeletedSignalRHandler(
8482
CiteContext db,
8583
IMapper mapper,
86-
IUserService userPermissionService,
87-
IHubContext<MainHub> mainHub) : base(db, mapper, userPermissionService, mainHub)
84+
IHubContext<MainHub> mainHub) : base(db, mapper, mainHub)
8885
{
8986
}
9087

0 commit comments

Comments
 (0)