identity: add proxy controller
This commit is contained in:
parent
727f2f6ba2
commit
b95fb76cd4
9 changed files with 446 additions and 10 deletions
21
Foxchat.Identity/Controllers/Proxy/GuildsProxyController.cs
Normal file
21
Foxchat.Identity/Controllers/Proxy/GuildsProxyController.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using Foxchat.Core.Federation;
|
||||
using Foxchat.Core.Models;
|
||||
using Foxchat.Core.Models.Http;
|
||||
using Foxchat.Identity.Middleware;
|
||||
using Foxchat.Identity.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Foxchat.Identity.Controllers.Proxy;
|
||||
|
||||
[Route("/_fox/proxy/guilds")]
|
||||
public class GuildsProxyController(
|
||||
ILogger logger,
|
||||
ChatInstanceResolverService chatInstanceResolverService,
|
||||
RequestSigningService requestSigningService)
|
||||
: ProxyControllerBase(logger, chatInstanceResolverService, requestSigningService)
|
||||
{
|
||||
[Authorize("chat_client")]
|
||||
[HttpPost]
|
||||
public Task<IActionResult> CreateGuild([FromBody] GuildsApi.CreateGuildRequest req) =>
|
||||
Proxy<Guilds.Guild>(HttpMethod.Post, req);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue