mirror of
https://github.com/claunia/marechai.git
synced 2026-07-08 17:57:08 +00:00
Fix more warnings.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
Variant="Variant.Outlined"
|
||||
Required="true"
|
||||
RequiredError="@L["Name is required."]"
|
||||
Validation="ValidateNameAsync"
|
||||
Validation="@(new Func<string, Task<string>>(ValidateNameAsync))"
|
||||
Immediate="true"
|
||||
Class="mb-4"/>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
Variant="Variant.Outlined"
|
||||
Required="true"
|
||||
RequiredError="@L["Extension is required."]"
|
||||
Validation="ValidateExtensionAsync"
|
||||
Validation="@(new Func<string, Task<string>>(ValidateExtensionAsync))"
|
||||
Immediate="true"
|
||||
Class="mb-4"/>
|
||||
|
||||
|
||||
@@ -464,13 +464,13 @@
|
||||
</MudDialog>
|
||||
|
||||
@code {
|
||||
string _validationError;
|
||||
string _validationError = null;
|
||||
SoftwarePlatformDto _selectedPlatform;
|
||||
List<SoftwarePlatformDto> _allPlatforms;
|
||||
UnM49Dto? _selectedRegionToAdd;
|
||||
UnM49Dto _selectedRegionToAdd;
|
||||
List<UnM49Dto> _allUnM49;
|
||||
List<UnM49BySoftwareReleaseDto> _releaseRegions;
|
||||
Iso639Dto? _selectedLanguageToAdd;
|
||||
Iso639Dto _selectedLanguageToAdd;
|
||||
List<Iso639Dto> _allLanguages;
|
||||
List<LanguageBySoftwareReleaseDto> _releaseLanguages;
|
||||
CompanyDto _selectedPublisher;
|
||||
|
||||
@@ -15,7 +15,6 @@ public partial class SoftwareReleases
|
||||
List<SoftwareReleaseDto> _releases;
|
||||
string _successMessage;
|
||||
string _versionName;
|
||||
string _softwareName;
|
||||
bool _isVersionContext;
|
||||
bool _isSoftwareContext;
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ public class BooksService(Marechai.ApiClient.Client client)
|
||||
{
|
||||
return await client.Books[bookId].Cover.Upload.PostAsync(body);
|
||||
}
|
||||
catch(ProblemDetails ex)
|
||||
catch(ProblemDetails)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -27,12 +27,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.ApiClient.Models;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
|
||||
namespace Marechai.Services;
|
||||
|
||||
public class CompaniesService(Marechai.ApiClient.Client client, IStringLocalizer<CompaniesService> localizer)
|
||||
public class CompaniesService(Marechai.ApiClient.Client client)
|
||||
{
|
||||
public async Task<List<CompanyDto>> GetAsync()
|
||||
{
|
||||
|
||||
@@ -27,12 +27,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.ApiClient.Models;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
|
||||
namespace Marechai.Services;
|
||||
|
||||
public class MachinesService(Marechai.ApiClient.Client client, IStringLocalizer<MachinesService> localizer)
|
||||
public class MachinesService(Marechai.ApiClient.Client client)
|
||||
{
|
||||
public async Task<MachineDto> GetMachine(int id)
|
||||
{
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.ApiClient.Models;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
namespace Marechai.Services;
|
||||
|
||||
public class NewsService(Marechai.ApiClient.Client client, IStringLocalizer<NewsService> localizer)
|
||||
public class NewsService(Marechai.ApiClient.Client client)
|
||||
{
|
||||
public async Task<List<NewsDto>> GetNewsAsync()
|
||||
{
|
||||
|
||||
@@ -10,19 +10,19 @@ public sealed class SecurityHeadersMiddleware(RequestDelegate next)
|
||||
{
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
|
||||
// TODO Change the value depending of your needs
|
||||
context.Response.Headers.Add("referrer-policy", new StringValues("strict-origin-when-cross-origin"));
|
||||
context.Response.Headers["referrer-policy"] = new StringValues("strict-origin-when-cross-origin");
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
|
||||
context.Response.Headers.Add("x-content-type-options", new StringValues("nosniff"));
|
||||
context.Response.Headers["x-content-type-options"] = new StringValues("nosniff");
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
|
||||
context.Response.Headers.Add("x-frame-options", new StringValues("DENY"));
|
||||
context.Response.Headers["x-frame-options"] = new StringValues("DENY");
|
||||
|
||||
// https://security.stackexchange.com/questions/166024/does-the-x-permitted-cross-domain-policies-header-have-any-benefit-for-my-websit
|
||||
context.Response.Headers.Add("X-Permitted-Cross-Domain-Policies", new StringValues("none"));
|
||||
context.Response.Headers["X-Permitted-Cross-Domain-Policies"] = new StringValues("none");
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
|
||||
context.Response.Headers.Add("x-xss-protection", new StringValues("1; mode=block"));
|
||||
context.Response.Headers["x-xss-protection"] = new StringValues("1; mode=block");
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
|
||||
// https://github.com/w3c/webappsec-feature-policy/blob/master/features.md
|
||||
|
||||
Reference in New Issue
Block a user