📝 Fix wrong parameters' name
This commit is contained in:
@@ -24,8 +24,8 @@ public class TranslationController(ITranslationProvider provider, ICacheService
|
|||||||
[Authorize]
|
[Authorize]
|
||||||
public async Task<ActionResult<string>> Translate(
|
public async Task<ActionResult<string>> Translate(
|
||||||
[FromBody] string text,
|
[FromBody] string text,
|
||||||
[FromQuery(Name = "from")] string targetLanguage,
|
[FromQuery(Name = "to")] string targetLanguage,
|
||||||
[FromQuery(Name = "to")] string? sourceLanguage
|
[FromQuery(Name = "from")] string? sourceLanguage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (HttpContext.Items["CurrentUser"] is not Account currentUser) return Unauthorized();
|
if (HttpContext.Items["CurrentUser"] is not Account currentUser) return Unauthorized();
|
||||||
|
Reference in New Issue
Block a user