Every route is a constant in ApiPaths
Build / Build (push) Successful in 35s

All 384 routes, the Mastodon API, the client API and the frozen federation
paths, are read from one class with one nested class per controller. Their
values are unchanged, checked one by one against the old literals; decePubClient
keeps its own APIs class.

Checked against GoToSocial in the pasture: 64 passed, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W4YtEJrgxG12Pc39Fai8Bd
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-11-10 01:59:20 +01:00
1 parent 0f73f69239
commit 739a1603ca
47 files changed
+952 -373

No files matched your search

@@ -17,7 +17,7 @@ namespace PrivaPub.Api.Mastodon.Controllers
IOpenIddictApplicationManager applications,
PrivaPub.Infrastructure.Push.IVapid vapid) : MastodonController
{
[HttpPost("/api/v1/apps"), AllowAnonymous]
[HttpPost(ApiPaths.Apps.POST_Create), AllowAnonymous]
public async Task<IActionResult> Create(CancellationToken token)
{
var name = Params.Get("client_name")?.Trim();
@@ -69,7 +69,7 @@ namespace PrivaPub.Api.Mastodon.Controllers
});
}
[HttpGet("/api/v1/apps/verify_credentials")]
[HttpGet(ApiPaths.Apps.GET_Verify)]
public async Task<IActionResult> Verify(CancellationToken token)
{
var clientId = User.GetPresenters().FirstOrDefault() ?? User.GetClaim(Claims.ClientId);