Add Support for connectionId ...

This commit is contained in:
2025-11-16 20:40:45 +03:30
parent 981eeb46e8
commit 546d72b788
2 changed files with 26 additions and 10 deletions
+21 -5
View File
@@ -65,6 +65,7 @@ namespace xWebinarService.Controllers
//
// Retrieve User Info ...
var userInfo = await GetUserInfo();
var connectionId = GetConnectionId();
bool isAdmin = userInfo.Roles.Any(r => r.ToNormalString() == "admin");
var userId = userInfo.UserId;
@@ -77,7 +78,10 @@ namespace xWebinarService.Controllers
//
var result = await WebinarProvider
.CreateWebinar(item);
.CreateWebinar(
item: item,
connectionId: connectionId
);
//
return Ok(result.
@@ -108,6 +112,7 @@ namespace xWebinarService.Controllers
//
// Retrieve User Info ...
var userInfo = await GetUserInfo();
var connectionId = GetConnectionId();
bool isAdmin = userInfo.Roles.Any(r => r.ToNormalString() == "admin");
var userId = userInfo.UserId;
@@ -121,7 +126,10 @@ namespace xWebinarService.Controllers
//
var result = await WebinarProvider
.UpdateWebinar(item);
.UpdateWebinar(
item: item,
connectionId: connectionId
);
//
return Ok(result.
@@ -296,6 +304,7 @@ namespace xWebinarService.Controllers
//
// Retrieve User Info ...
var userInfo = await GetUserInfo();
var connectionId = GetConnectionId();
bool isAdmin = userInfo.Roles.Any(r => r.ToNormalString() == "admin");
var userId = userInfo.UserId;
@@ -318,7 +327,10 @@ namespace xWebinarService.Controllers
//
var result = await WebinarProvider
.RemoveWebinar(webinarId);
.RemoveWebinar(
webinarId: webinarId,
connectionId: connectionId
);
//
return Ok(result.
@@ -354,6 +366,7 @@ namespace xWebinarService.Controllers
//
// Retrieve User Info ...
var userInfo = await GetUserInfo();
var connectionId = GetConnectionId();
bool isAdmin = userInfo.Roles.Any(r => r.ToNormalString() == "admin");
var userId = userInfo.UserId;
@@ -381,7 +394,8 @@ namespace xWebinarService.Controllers
var result = await WebinarProvider
.Subscribe(
webinarId: webinarId,
subscriberId: subscriberId
subscriberId: subscriberId,
connectionId: connectionId
);
//
@@ -475,6 +489,7 @@ namespace xWebinarService.Controllers
//
// Retrieve User Info ...
var userInfo = await GetUserInfo();
var connectionId = GetConnectionId();
bool isAdmin = userInfo.Roles.Any(r => r.ToNormalString() == "admin");
var userId = userInfo.UserId;
@@ -502,7 +517,8 @@ namespace xWebinarService.Controllers
var result = await WebinarProvider
.Unsubscribe(
webinarId: webinarId,
subscriberId: subscriberId
subscriberId: subscriberId,
connectionId: connectionId
);
//
+5 -5
View File
@@ -289,7 +289,7 @@ namespace xWebinarService.Providers
//
await SendPush(
action: XBaseEntityHubAction.Add.GetStringValue(),
payLoad: entity.ToJSON(),
payLoad: entity.ToJSON(camelCase: true),
connectionId: connectionId
);
@@ -443,7 +443,7 @@ namespace xWebinarService.Providers
//
await SendPush(
action: XBaseEntityHubAction.Update.GetStringValue(),
payLoad: entity.ToJSON(),
payLoad: entity.ToJSON(camelCase: true),
connectionId: connectionId
);
}
@@ -708,7 +708,7 @@ namespace xWebinarService.Providers
//
await SendPush(
action: XBaseEntityHubAction.Delete.GetStringValue(),
payLoad: entity.ToJSON(),
payLoad: entity.ToJSON(camelCase: true),
connectionId: connectionId
);
}
@@ -801,7 +801,7 @@ namespace xWebinarService.Providers
//
await SendPush(
action: XWebinarEntityHubAction.Subscribe.GetStringValue(),
payLoad: entity.ToJSON(),
payLoad: entity.ToJSON(camelCase: true),
connectionId: connectionId
);
}
@@ -927,7 +927,7 @@ namespace xWebinarService.Providers
//
await SendPush(
action: XWebinarEntityHubAction.Unsubscribe.GetStringValue(),
payLoad: entity.ToJSON(),
payLoad: entity.ToJSON(camelCase: true),
connectionId: connectionId
);
}