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

@@ -19,13 +19,13 @@ namespace PrivaPub.Api.Mastodon.Controllers
MastodonMapper mapper,
IInstanceSettings settings) : MastodonController
{
[HttpGet("/api/v1/suggestions"), Scope("read")]
[HttpGet(ApiPaths.Suggestions.GET_V1), Scope("read")]
public async Task<IActionResult> V1(CancellationToken token) => Json((await Suggested(token)).Select(s => s.Account).ToList());
[HttpGet("/api/v2/suggestions"), Scope("read")]
[HttpGet(ApiPaths.Suggestions.GET_V2), Scope("read")]
public async Task<IActionResult> V2(CancellationToken token) => Json(await Suggested(token));
[HttpDelete("/api/v1/suggestions/{accountId}"), Scope("read")]
[HttpDelete(ApiPaths.Suggestions.DELETE_M_Dismiss), Scope("read")]
public async Task<IActionResult> Dismiss(string accountId, CancellationToken token)
{
if (!string.IsNullOrEmpty(accountId) && accountId.Length <= 64)