fix: make query parameters consistent
This commit is contained in:
parent
f766a2054b
commit
27846a4fe4
3 changed files with 4 additions and 4 deletions
|
@ -44,7 +44,7 @@ public class FediverseAuthController(
|
||||||
[ProducesResponseType<SingleUrlResponse>(statusCode: StatusCodes.Status200OK)]
|
[ProducesResponseType<SingleUrlResponse>(statusCode: StatusCodes.Status200OK)]
|
||||||
public async Task<IActionResult> GetFediverseUrlAsync(
|
public async Task<IActionResult> GetFediverseUrlAsync(
|
||||||
[FromQuery] string instance,
|
[FromQuery] string instance,
|
||||||
[FromQuery] bool forceRefresh = false
|
[FromQuery(Name = "force-refresh")] bool forceRefresh = false
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (instance.Any(c => c is '@' or ':' or '/') || !instance.Contains('.'))
|
if (instance.Any(c => c is '@' or ':' or '/') || !instance.Contains('.'))
|
||||||
|
@ -139,7 +139,7 @@ public class FediverseAuthController(
|
||||||
[Authorize("*")]
|
[Authorize("*")]
|
||||||
public async Task<IActionResult> AddFediverseAccountAsync(
|
public async Task<IActionResult> AddFediverseAccountAsync(
|
||||||
[FromQuery] string instance,
|
[FromQuery] string instance,
|
||||||
[FromQuery] bool forceRefresh = false
|
[FromQuery(Name = "force-refresh")] bool forceRefresh = false
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (instance.Any(c => c is '@' or ':' or '/') || !instance.Contains('.'))
|
if (instance.Any(c => c is '@' or ':' or '/') || !instance.Contains('.'))
|
||||||
|
|
|
@ -65,7 +65,7 @@ export const actions = {
|
||||||
try {
|
try {
|
||||||
const resp = await apiRequest<{ url: string }>(
|
const resp = await apiRequest<{ url: string }>(
|
||||||
"GET",
|
"GET",
|
||||||
`/auth/fediverse?instance=${encodeURIComponent(instance)}&forceRefresh=true`,
|
`/auth/fediverse?instance=${encodeURIComponent(instance)}&force-refresh=true`,
|
||||||
{ fetch, isInternal: true },
|
{ fetch, isInternal: true },
|
||||||
);
|
);
|
||||||
redirect(303, resp.url);
|
redirect(303, resp.url);
|
||||||
|
|
|
@ -24,7 +24,7 @@ export const actions = {
|
||||||
|
|
||||||
const { url } = await apiRequest<{ url: string }>(
|
const { url } = await apiRequest<{ url: string }>(
|
||||||
"GET",
|
"GET",
|
||||||
`/auth/fediverse/add-account?instance=${encodeURIComponent(instance)}&forceRefresh=true`,
|
`/auth/fediverse/add-account?instance=${encodeURIComponent(instance)}&force-refresh=true`,
|
||||||
{
|
{
|
||||||
isInternal: true,
|
isInternal: true,
|
||||||
fetch,
|
fetch,
|
||||||
|
|
Loading…
Reference in a new issue