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:
1 parent
0f73f69239
commit
739a1603ca
47 files changed
+952
-373
No files matched your search
@@ -23,7 +23,7 @@ namespace PrivaPub.Federation.Controllers
|
||||
IOptionsMonitor<RegistrationOptions> registrations,
|
||||
Domain.Instance.IInstanceSettings settings) : ControllerBase
|
||||
{
|
||||
[HttpGet, Route("/.well-known/webfinger")]
|
||||
[HttpGet, Route(ApiPaths.WellKnown.GET_WebFinger)]
|
||||
public async Task<IActionResult> WebFinger([FromQuery] string resource, CancellationToken token)
|
||||
{
|
||||
if (string.IsNullOrEmpty(resource))
|
||||
@@ -76,7 +76,7 @@ namespace PrivaPub.Federation.Controllers
|
||||
return Content(document.ToJsonString(), "application/jrd+json; charset=utf-8");
|
||||
}
|
||||
|
||||
[HttpGet, Route("/.well-known/nodeinfo")]
|
||||
[HttpGet, Route(ApiPaths.WellKnown.GET_NodeInfoLinks)]
|
||||
public async Task<IActionResult> NodeInfoLinks(CancellationToken token)
|
||||
{
|
||||
var document = new JsonObject
|
||||
@@ -102,7 +102,7 @@ namespace PrivaPub.Federation.Controllers
|
||||
return Content(document.ToJsonString(), "application/json; charset=utf-8");
|
||||
}
|
||||
|
||||
[HttpGet, Route("/nodeinfo/{version:regex(^2\\.[[01]]$)}")]
|
||||
[HttpGet, Route(ApiPaths.WellKnown.GET_M_NodeInfo)]
|
||||
public async Task<IActionResult> NodeInfo(string version, CancellationToken token)
|
||||
{
|
||||
var users = await Counted.Users(token);
|
||||
|
||||
Reference in new issue
Block a user