From eaabe4896ebe743e202227306769b90c68e6cae4 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 7 Feb 2024 20:49:52 +0100 Subject: [PATCH] [backend/masto-client] Remove Mastodon prefix from MastodonApiControllers This is no longer necessary due to namespacing changes --- .../{MastodonAccountController.cs => AccountController.cs} | 2 +- .../Mastodon/{MastodonAuthController.cs => AuthController.cs} | 2 +- .../{MastodonStatusController.cs => StatusController.cs} | 2 +- .../{MastodonTimelineController.cs => TimelineController.cs} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename Iceshrimp.Backend/Controllers/Mastodon/{MastodonAccountController.cs => AccountController.cs} (99%) rename Iceshrimp.Backend/Controllers/Mastodon/{MastodonAuthController.cs => AuthController.cs} (98%) rename Iceshrimp.Backend/Controllers/Mastodon/{MastodonStatusController.cs => StatusController.cs} (95%) rename Iceshrimp.Backend/Controllers/Mastodon/{MastodonTimelineController.cs => TimelineController.cs} (95%) diff --git a/Iceshrimp.Backend/Controllers/Mastodon/MastodonAccountController.cs b/Iceshrimp.Backend/Controllers/Mastodon/AccountController.cs similarity index 99% rename from Iceshrimp.Backend/Controllers/Mastodon/MastodonAccountController.cs rename to Iceshrimp.Backend/Controllers/Mastodon/AccountController.cs index 81782e13..ec78ba7b 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/MastodonAccountController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/AccountController.cs @@ -19,7 +19,7 @@ namespace Iceshrimp.Backend.Controllers.Mastodon; [Authenticate] [EnableRateLimiting("sliding")] [Produces("application/json")] -public class MastodonAccountController( +public class AccountController( DatabaseContext db, UserRenderer userRenderer, NoteRenderer noteRenderer, diff --git a/Iceshrimp.Backend/Controllers/Mastodon/MastodonAuthController.cs b/Iceshrimp.Backend/Controllers/Mastodon/AuthController.cs similarity index 98% rename from Iceshrimp.Backend/Controllers/Mastodon/MastodonAuthController.cs rename to Iceshrimp.Backend/Controllers/Mastodon/AuthController.cs index b6538a0a..b5eeaefe 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/MastodonAuthController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/AuthController.cs @@ -14,7 +14,7 @@ namespace Iceshrimp.Backend.Controllers.Mastodon; [MastodonApiController] [EnableRateLimiting("sliding")] [Produces("application/json")] -public class MastodonAuthController(DatabaseContext db) : Controller { +public class AuthController(DatabaseContext db) : Controller { [HttpGet("/api/v1/apps/verify_credentials")] [Authenticate] [Produces("application/json")] diff --git a/Iceshrimp.Backend/Controllers/Mastodon/MastodonStatusController.cs b/Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs similarity index 95% rename from Iceshrimp.Backend/Controllers/Mastodon/MastodonStatusController.cs rename to Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs index 48d13793..b1517341 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/MastodonStatusController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs @@ -17,7 +17,7 @@ namespace Iceshrimp.Backend.Controllers.Mastodon; [Authenticate] [EnableRateLimiting("sliding")] [Produces("application/json")] -public class MastodonStatusController(DatabaseContext db, NoteRenderer noteRenderer, NoteService noteSvc) : Controller { +public class StatusController(DatabaseContext db, NoteRenderer noteRenderer, NoteService noteSvc) : Controller { [HttpGet("{id}")] [Authenticate("read:statuses")] [Produces("application/json")] diff --git a/Iceshrimp.Backend/Controllers/Mastodon/MastodonTimelineController.cs b/Iceshrimp.Backend/Controllers/Mastodon/TimelineController.cs similarity index 95% rename from Iceshrimp.Backend/Controllers/Mastodon/MastodonTimelineController.cs rename to Iceshrimp.Backend/Controllers/Mastodon/TimelineController.cs index 3a6c7f15..d42e2f0e 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/MastodonTimelineController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/TimelineController.cs @@ -20,7 +20,7 @@ namespace Iceshrimp.Backend.Controllers.Mastodon; [Produces("application/json")] [ProducesResponseType(StatusCodes.Status401Unauthorized, Type = typeof(MastodonErrorResponse))] [ProducesResponseType(StatusCodes.Status403Forbidden, Type = typeof(MastodonErrorResponse))] -public class MastodonTimelineController(DatabaseContext db, NoteRenderer noteRenderer) : Controller { +public class TimelineController(DatabaseContext db, NoteRenderer noteRenderer) : Controller { [Authorize("read:statuses")] [HttpGet("home")] [Produces("application/json")]