From dde377f41dbb5272d3a1d3f746da555681557bd9 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 9 Feb 2024 12:09:03 +0100 Subject: [PATCH] [backend] Code cleanup: remove unnecessary using directives --- .../Controllers/Mastodon/AccountController.cs | 1 - .../Controllers/Mastodon/Renderers/UserRenderer.cs | 2 -- .../Controllers/Mastodon/Schemas/PaginationQuery.cs | 1 - .../Controllers/Mastodon/Schemas/StatusSchemas.cs | 3 --- Iceshrimp.Backend/Core/Database/Tables/Poll.cs | 1 - .../Core/Federation/ActivityStreams/Types/ASLink.cs | 1 - .../Core/Middleware/ErrorHandlerMiddleware.cs | 1 - .../Core/Middleware/RequestDurationMiddleware.cs | 7 ------- 8 files changed, 17 deletions(-) diff --git a/Iceshrimp.Backend/Controllers/Mastodon/AccountController.cs b/Iceshrimp.Backend/Controllers/Mastodon/AccountController.cs index e5ca9e39..ba639f77 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/AccountController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/AccountController.cs @@ -1,4 +1,3 @@ -using EntityFrameworkCore.Projectables; using Iceshrimp.Backend.Controllers.Attributes; using Iceshrimp.Backend.Controllers.Mastodon.Attributes; using Iceshrimp.Backend.Controllers.Mastodon.Schemas; diff --git a/Iceshrimp.Backend/Controllers/Mastodon/Renderers/UserRenderer.cs b/Iceshrimp.Backend/Controllers/Mastodon/Renderers/UserRenderer.cs index 99148878..acaa1463 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/Renderers/UserRenderer.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/Renderers/UserRenderer.cs @@ -1,10 +1,8 @@ using Iceshrimp.Backend.Controllers.Mastodon.Schemas.Entities; using Iceshrimp.Backend.Core.Configuration; -using Iceshrimp.Backend.Core.Database; using Iceshrimp.Backend.Core.Database.Tables; using Iceshrimp.Backend.Core.Extensions; using Iceshrimp.Backend.Core.Helpers.LibMfm.Conversion; -using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Options; namespace Iceshrimp.Backend.Controllers.Mastodon.Renderers; diff --git a/Iceshrimp.Backend/Controllers/Mastodon/Schemas/PaginationQuery.cs b/Iceshrimp.Backend/Controllers/Mastodon/Schemas/PaginationQuery.cs index 3a26f290..856324cf 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/Schemas/PaginationQuery.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/Schemas/PaginationQuery.cs @@ -1,5 +1,4 @@ using Microsoft.AspNetCore.Mvc; -using B = Microsoft.AspNetCore.Mvc.BindPropertyAttribute; namespace Iceshrimp.Backend.Controllers.Mastodon.Schemas; diff --git a/Iceshrimp.Backend/Controllers/Mastodon/Schemas/StatusSchemas.cs b/Iceshrimp.Backend/Controllers/Mastodon/Schemas/StatusSchemas.cs index ed3e2d45..46c84856 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/Schemas/StatusSchemas.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/Schemas/StatusSchemas.cs @@ -1,8 +1,5 @@ -using Iceshrimp.Backend.Core.Database.Tables; -using Iceshrimp.Backend.Core.Helpers; using J = System.Text.Json.Serialization.JsonPropertyNameAttribute; using JR = System.Text.Json.Serialization.JsonRequiredAttribute; -using JC = System.Text.Json.Serialization.JsonConverterAttribute; using B = Microsoft.AspNetCore.Mvc.BindPropertyAttribute; namespace Iceshrimp.Backend.Controllers.Mastodon.Schemas; diff --git a/Iceshrimp.Backend/Core/Database/Tables/Poll.cs b/Iceshrimp.Backend/Core/Database/Tables/Poll.cs index 35f8167e..efe4e7ac 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Poll.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Poll.cs @@ -1,7 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; -using NpgsqlTypes; namespace Iceshrimp.Backend.Core.Database.Tables; diff --git a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs index d8383f1c..f6abe692 100644 --- a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs +++ b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs @@ -1,5 +1,4 @@ using J = Newtonsoft.Json.JsonPropertyAttribute; -using JR = Newtonsoft.Json.JsonRequiredAttribute; namespace Iceshrimp.Backend.Core.Federation.ActivityStreams.Types; diff --git a/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs b/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs index 1e38f3e2..1d7ffaff 100644 --- a/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs +++ b/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs @@ -1,5 +1,4 @@ using System.Diagnostics.CodeAnalysis; -using System.Globalization; using System.Net; using Iceshrimp.Backend.Controllers.Mastodon.Attributes; using Iceshrimp.Backend.Controllers.Mastodon.Schemas; diff --git a/Iceshrimp.Backend/Core/Middleware/RequestDurationMiddleware.cs b/Iceshrimp.Backend/Core/Middleware/RequestDurationMiddleware.cs index 88113c62..a6567117 100644 --- a/Iceshrimp.Backend/Core/Middleware/RequestDurationMiddleware.cs +++ b/Iceshrimp.Backend/Core/Middleware/RequestDurationMiddleware.cs @@ -1,11 +1,4 @@ -using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Net; -using Iceshrimp.Backend.Controllers.Mastodon.Attributes; -using Iceshrimp.Backend.Controllers.Mastodon.Schemas; -using Iceshrimp.Backend.Controllers.Schemas; -using Iceshrimp.Backend.Core.Configuration; -using Microsoft.Extensions.Options; namespace Iceshrimp.Backend.Core.Middleware;