This commit is contained in:
2026-04-16 16:02:03 +03:30
parent 51d07f1cba
commit 98d5354c36
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -124,7 +124,7 @@ namespace xApi.Controllers {
[Authorize (Policy = XPolicies.Agent)] [Authorize (Policy = XPolicies.Agent)]
public ActionResult<string> HiAgent () { public ActionResult<string> HiAgent () {
// //
var result = $"Hi Admin: {User.Identity.Name} ..."; var result = $"Hi Agent: {User.Identity.Name} ...";
// //
return Ok (result); return Ok (result);
@@ -138,7 +138,7 @@ namespace xApi.Controllers {
[Authorize (Policy = XPolicies.EnabledAgent)] [Authorize (Policy = XPolicies.EnabledAgent)]
public ActionResult<string> HiEnabledAgent () { public ActionResult<string> HiEnabledAgent () {
// //
var result = $"Hi Admin: {User.Identity.Name} is Enabled ..."; var result = $"Hi Agent: {User.Identity.Name} is Enabled ...";
// //
return Ok (result); return Ok (result);
+2 -1
View File
@@ -8,6 +8,7 @@ using xAiService.Interfaces;
using xCommons.Attributes; using xCommons.Attributes;
using xCommons.Configurations; using xCommons.Configurations;
using xCommons.Providers; using xCommons.Providers;
using xIdentityHelper;
using xIdentityService.Interfaces; using xIdentityService.Interfaces;
namespace xApi.Controllers.V1 namespace xApi.Controllers.V1
@@ -38,8 +39,8 @@ namespace xApi.Controllers.V1
// //
#region Text Actions ... #region Text Actions ...
[AllowAnonymous]
[HttpGet("Ask")] [HttpGet("Ask")]
[Authorize(Policy = XPolicies.EnabledUser)]
public override async Task<ActionResult<string>> Ask( public override async Task<ActionResult<string>> Ask(
[FromQuery] string prompt, [FromQuery] string prompt,
CancellationToken cancellationToken = default CancellationToken cancellationToken = default