update to .net 9 and add new OpenAPI packages
This commit is contained in:
parent
80b7f192f1
commit
7e6698c3fb
17 changed files with 451 additions and 1001 deletions
|
@ -26,6 +26,7 @@ using Microsoft.EntityFrameworkCore;
|
|||
namespace Foxnouns.Backend.Controllers.Authentication;
|
||||
|
||||
[Route("/api/internal/auth")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class AuthController(
|
||||
Config config,
|
||||
DatabaseContext db,
|
||||
|
|
|
@ -31,6 +31,7 @@ using NodaTime;
|
|||
namespace Foxnouns.Backend.Controllers.Authentication;
|
||||
|
||||
[Route("/api/internal/auth/discord")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class DiscordAuthController(
|
||||
[UsedImplicitly] Config config,
|
||||
ILogger logger,
|
||||
|
|
|
@ -30,6 +30,7 @@ using NodaTime;
|
|||
namespace Foxnouns.Backend.Controllers.Authentication;
|
||||
|
||||
[Route("/api/internal/auth/email")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EmailAuthController(
|
||||
[UsedImplicitly] Config config,
|
||||
DatabaseContext db,
|
||||
|
|
|
@ -28,6 +28,7 @@ using NodaTime;
|
|||
namespace Foxnouns.Backend.Controllers.Authentication;
|
||||
|
||||
[Route("/api/internal/auth/fediverse")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class FediverseAuthController(
|
||||
ILogger logger,
|
||||
DatabaseContext db,
|
||||
|
|
|
@ -31,6 +31,7 @@ using NodaTime;
|
|||
namespace Foxnouns.Backend.Controllers.Authentication;
|
||||
|
||||
[Route("/api/internal/auth/google")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class GoogleAuthController(
|
||||
[UsedImplicitly] Config config,
|
||||
ILogger logger,
|
||||
|
|
|
@ -17,6 +17,7 @@ using NodaTime;
|
|||
namespace Foxnouns.Backend.Controllers.Authentication;
|
||||
|
||||
[Route("/api/internal/auth/tumblr")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class TumblrAuthController(
|
||||
[UsedImplicitly] Config config,
|
||||
ILogger logger,
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace Foxnouns.Backend.Controllers;
|
|||
|
||||
[Route("/api/internal/data-exports")]
|
||||
[Authorize("identify")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class ExportsController(
|
||||
ILogger logger,
|
||||
Config config,
|
||||
|
|
|
@ -80,6 +80,7 @@ public class FlagsController(
|
|||
|
||||
[HttpPatch("{id}")]
|
||||
[Authorize("user.update")]
|
||||
[ProducesResponseType<PrideFlagResponse>(statusCode: StatusCodes.Status200OK)]
|
||||
public async Task<IActionResult> UpdateFlagAsync(Snowflake id, [FromBody] UpdateFlagRequest req)
|
||||
{
|
||||
ValidationUtils.Validate(ValidateFlag(req.Name, req.Description, null));
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace Foxnouns.Backend.Controllers;
|
|||
|
||||
[ApiController]
|
||||
[Route("/api/internal")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public partial class InternalController(DatabaseContext db) : ControllerBase
|
||||
{
|
||||
[GeneratedRegex(@"(\{\w+\})")]
|
||||
|
|
|
@ -144,6 +144,7 @@ public class MembersController(
|
|||
}
|
||||
|
||||
[HttpPatch("/api/v2/users/@me/members/{memberRef}")]
|
||||
[ProducesResponseType<MemberResponse>(statusCode: StatusCodes.Status200OK)]
|
||||
[Authorize("member.update")]
|
||||
public async Task<IActionResult> UpdateMemberAsync(
|
||||
string memberRef,
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace Foxnouns.Backend.Controllers;
|
|||
"CA1862:Use the \'StringComparison\' method overloads to perform case-insensitive string comparisons",
|
||||
Justification = "Not usable with EFCore"
|
||||
)]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class SidController(Config config, DatabaseContext db) : ApiControllerBase
|
||||
{
|
||||
[HttpGet("{**id}")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue