Compare commits
7
Commits
7885a6b629
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d91d92c70 | ||
|
|
08cab60c36 | ||
|
|
85b16cb80e | ||
|
|
199ee757c7 | ||
|
|
3a6fc3b98d | ||
|
|
5875c766a1 | ||
|
|
5035bab4a4 |
@@ -1,5 +1,7 @@
|
|||||||
namespace xServices.Configurations
|
namespace xServices.Configurations
|
||||||
{
|
{
|
||||||
public partial class XServicesConfiguration
|
public partial class XServicesConfiguration
|
||||||
{ }
|
{
|
||||||
|
public string Name { get; set; } = "Default";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -12,25 +12,28 @@ using System.Collections.Generic;
|
|||||||
using xIdentityService.Interfaces;
|
using xIdentityService.Interfaces;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using xBotService.Reciever;
|
||||||
|
|
||||||
namespace xServices.Controllers
|
namespace xServices.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[RequireXPowered]
|
[RequireXPowered]
|
||||||
public class XBotProviderController : XBotProviderControllerBase
|
public class BotController : XBotProviderControllerBase
|
||||||
{
|
{
|
||||||
public XBotProviderController(
|
public BotController(
|
||||||
IXBotProvider botProvider,
|
IXBotProvider botProvider,
|
||||||
|
ILogger<BotController> logger,
|
||||||
XAppConfiguration appConfiguration,
|
XAppConfiguration appConfiguration,
|
||||||
IXIdentityProvider identityProvider,
|
IXIdentityProvider identityProvider,
|
||||||
XValidationProvider validationProvider,
|
XValidationProvider validationProvider,
|
||||||
ILogger<XBotProviderController> logger
|
XBotBotUpdateRecieverBackgroundService botHandler
|
||||||
) : base(
|
) : base(
|
||||||
botProvider,
|
logger: logger,
|
||||||
logger,
|
botHandler: botHandler,
|
||||||
appConfiguration,
|
botProvider: botProvider,
|
||||||
identityProvider,
|
appConfiguration: appConfiguration,
|
||||||
validationProvider
|
identityProvider: identityProvider,
|
||||||
|
validationProvider: validationProvider
|
||||||
)
|
)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -85,102 +88,52 @@ namespace xServices.Controllers
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [HttpPost("{chatId}/ShowVerificationMenu")]
|
[Authorize(Policy = XPolicies.EnabledAdmin)]
|
||||||
// [Authorize(Policy = XPolicies.EnabledAdmin)]
|
[HttpPost("{botUserId}/ShowVerificationMenu")]
|
||||||
// public override async Task<ActionResult<XBotMessageResponse>> ShowVerificationMenu(
|
public override async Task<ActionResult<XBotMessage>> ShowVerificationMenu(
|
||||||
// [FromRoute] long chatId,
|
[FromRoute] long botUserId,
|
||||||
// CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
// )
|
)
|
||||||
// {
|
{
|
||||||
// //
|
//
|
||||||
// var result = await base.ShowVerificationMenu(
|
var result = await base.ShowVerificationMenu(
|
||||||
// chatId: chatId,
|
botUserId: botUserId,
|
||||||
// cancellationToken: cancellationToken
|
cancellationToken: cancellationToken
|
||||||
// );
|
);
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// [HttpPost("{chatId}/SendVerificationCode")]
|
[HttpPost("{token}/VerifyUser")]
|
||||||
// [Authorize(Policy = XPolicies.EnabledAdmin)]
|
[Authorize(Policy = XPolicies.EnabledUser)]
|
||||||
// public override async Task<ActionResult<XBotMessageResponse>> SendVerificationCode(
|
public override async Task<ActionResult<XBotMessage>> VerifyUser(
|
||||||
// [FromRoute] long chatId,
|
[FromRoute] string token,
|
||||||
// [FromQuery] string code,
|
CancellationToken cancellationToken = default
|
||||||
// [FromQuery] int ttlSeconds,
|
)
|
||||||
// CancellationToken cancellationToken = default
|
{
|
||||||
// )
|
//
|
||||||
// {
|
var result = await base.VerifyUser(
|
||||||
// //
|
token: token,
|
||||||
// var result = await base.SendVerificationCode(
|
cancellationToken: cancellationToken
|
||||||
// code: code,
|
);
|
||||||
// chatId: chatId,
|
|
||||||
// ttlSeconds: ttlSeconds,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// [HttpPost("{id}/AnswerCallback")]
|
[HttpPost("Refresh")]
|
||||||
// [Authorize(Policy = XPolicies.EnabledAdmin)]
|
[Authorize(Policy = XPolicies.EnabledAdmin)]
|
||||||
// public override async Task<ActionResult<XBotMessageResponse>> AnswerCallbackQuery(
|
public override async Task<ActionResult> Refresh(
|
||||||
// [FromRoute] string callbackQueryId,
|
CancellationToken cancellationToken = default
|
||||||
// [FromQuery] string text = null,
|
)
|
||||||
// [FromQuery] bool showAlert = false,
|
{
|
||||||
// CancellationToken cancellationToken = default
|
//
|
||||||
// )
|
var result = await base.Refresh(cancellationToken);
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// var result = await base.AnswerCallbackQuery(
|
|
||||||
// text: text,
|
|
||||||
// showAlert: showAlert,
|
|
||||||
// callbackQueryId: callbackQueryId,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// [HttpPost("{chatId}/RemoveInlineKeyboard")]
|
|
||||||
// [Authorize(Policy = XPolicies.EnabledAdmin)]
|
|
||||||
// public override async Task<ActionResult<XBotMessageResponse>> RemoveInlineKeyboard(
|
|
||||||
// [FromRoute] long chatId,
|
|
||||||
// [FromQuery] long messageId,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// var result = await base.RemoveInlineKeyboard(
|
|
||||||
// chatId: chatId,
|
|
||||||
// messageId: messageId,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// [HttpPost("Webhook")]
|
|
||||||
// [Authorize(Policy = XPolicies.EnabledAdmin)]
|
|
||||||
// public override async Task<ActionResult<bool>> SetWebhook(
|
|
||||||
// [FromQuery] string webhookUrl,
|
|
||||||
// [FromQuery] string secretToken = null,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// var result = await base.SetWebhook(
|
|
||||||
// webhookUrl: webhookUrl,
|
|
||||||
// secretToken: secretToken,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-3
@@ -32,20 +32,21 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\xCommons\xCommons.csproj" />
|
<ProjectReference Include="..\xCommons\xCommons.csproj" />
|
||||||
<ProjectReference Include="..\xBotService\xBotService.csproj" />
|
<ProjectReference Include="..\xBotService\xBotService.csproj" />
|
||||||
|
<ProjectReference Include="..\xTagService\xTagService.csproj" />
|
||||||
<ProjectReference Include="..\xDataService\xDataService.csproj" />
|
<ProjectReference Include="..\xDataService\xDataService.csproj" />
|
||||||
<ProjectReference Include="..\xPushService\xPushService.csproj" />
|
<ProjectReference Include="..\xPushService\xPushService.csproj" />
|
||||||
|
<ProjectReference Include="..\xFileService\xFileService.csproj" />
|
||||||
<!-- <ProjectReference Include="..\XAiService\XAiService.csproj" /> -->
|
<!-- <ProjectReference Include="..\XAiService\XAiService.csproj" /> -->
|
||||||
<!-- <ProjectReference Include="..\xDataHelper\xDataHelper.csproj" /> -->
|
<!-- <ProjectReference Include="..\xDataHelper\xDataHelper.csproj" /> -->
|
||||||
<!-- <ProjectReference Include="..\xPushHelper\xPushHelper.csproj" /> -->
|
<!-- <ProjectReference Include="..\xPushHelper\xPushHelper.csproj" /> -->
|
||||||
<ProjectReference Include="..\xTagService\xTagService.csproj" />
|
|
||||||
<ProjectReference Include="..\xFileService\xFileService.csproj" />
|
|
||||||
<ProjectReference Include="..\xStringService\xStringService.csproj" />
|
<ProjectReference Include="..\xStringService\xStringService.csproj" />
|
||||||
<ProjectReference Include="..\XContentService\XContentService.csproj" />
|
<ProjectReference Include="..\XContentService\XContentService.csproj" />
|
||||||
<ProjectReference Include="..\xIdentityHelper\xIdentityHelper.csproj" />
|
<ProjectReference Include="..\xIdentityHelper\xIdentityHelper.csproj" />
|
||||||
<ProjectReference Include="..\xMessageService\xMessageService.csproj" />
|
<ProjectReference Include="..\xMessageService\xMessageService.csproj" />
|
||||||
<ProjectReference Include="..\xStorageService\xStorageService.csproj" />
|
<ProjectReference Include="..\xStorageService\xStorageService.csproj" />
|
||||||
<ProjectReference Include="..\xCategoryService\xCategoryService.csproj" />
|
|
||||||
<ProjectReference Include="..\xWebinarService\xWebinarService.csproj" />
|
<ProjectReference Include="..\xWebinarService\xWebinarService.csproj" />
|
||||||
|
<ProjectReference Include="..\xCategoryService\xCategoryService.csproj" />
|
||||||
|
<ProjectReference Include="..\xMT5BridgeService\xMT5BridgeService.csproj" />
|
||||||
<ProjectReference Include="..\xTermsAndConditionsService\xTermsAndConditionsService.csproj" />
|
<ProjectReference Include="..\xTermsAndConditionsService\xTermsAndConditionsService.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user