Skip to content

Commit 422a9e8

Browse files
self review
1 parent 61a72da commit 422a9e8

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

backend/Bugget.BO/Errors/BoErrors.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ namespace Bugget.BO.Errors;
44

55
public static class BoErrors
66
{
7-
public static readonly NotFoundError BugNotFoundError = new NotFoundError("bug_not_found", "Баг не найден");
87
public static readonly NotFoundError NotFoundError = new NotFoundError("not_found", "Объект не найден");
98
public static readonly NotFoundError ReportNotFoundError = new NotFoundError("report_not_found", "Репорт не найден");
109
public static readonly InternalServerError InternalServerError = new InternalServerError("internal_server_error", "Внутреняя ошибка сервера");

backend/Bugget.Entities/Constants/AttachmentConstants.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ public static class AttachmentConstants
55
public const string PreviewMimeType = "image/webp";
66

77
public static readonly string[] CompressibleMimeTypes =
8-
{ "text/plain", "text/csv", "application/json", "text/markdown", "text/json" };
8+
{ "text/plain", "text/csv", "application/json", "text/markdown", "text/json" };
99

1010
public static readonly string[] ImageMimeTypes =
11-
{ "image/png", "image/jpeg", "image/webp" };
11+
{ "image/png", "image/jpeg", "image/webp" };
1212

1313
public static readonly string[] MediaMimeTypes =
1414
{ "image/gif" };
@@ -19,7 +19,4 @@ public static class AttachmentConstants
1919
.Concat(MediaMimeTypes)
2020
.Concat(CompressibleMimeTypes)
2121
.ToArray());
22-
23-
24-
25-
}
22+
}

backend/Bugget/Program.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@
9595
.AddSingleton<CommentEventsService>()
9696
.AddSingleton<LimitsService>();
9797

98-
99-
10098
builder.Services
10199
.AddSingleton<ReportsDbClient>()
102100
.AddSingleton<CommentsObsoleteDbClient>()
@@ -150,12 +148,13 @@
150148

151149
app.UseSwaggerConfiguration();
152150

151+
// регистрируем до авторизации
152+
app.MapHealthChecks("/_internal/ping");
153+
153154
app.UseAuthorization();
154155

155156
app.MapControllers();
156157

157-
app.MapHealthChecks("/_internal/ping");
158-
159158
app.UseCors("CorsPolicy");
160159

161160
app.UseMiddleware<ResultExceptionHandlerMiddleware>();

0 commit comments

Comments
 (0)