Foxchat.NET/Foxchat.Identity/Controllers/Proxy/GuildsProxyController.cs

21 lines
No EOL
711 B
C#

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);
}