last ...
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user