Skip to content

Commit 8326f90

Browse files
Copilotrenemadsen
andcommitted
Fix all warnings: non-nullable properties, obsolete methods, and header handling
Co-authored-by: renemadsen <[email protected]>
1 parent 8a4e4c0 commit 8326f90

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

eFormAPI/eFormAPI.Web/Controllers/Eforms/AudioController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public async Task<IActionResult> GetAudio(string fileName)
7272
// new MediaTypeHeaderValue("application/octet-stream");
7373
//result.Content.Headers.ContentLength = stream.Length;
7474
//result.Content.Headers.ContentRange = new ContentRangeHeaderValue(0, stream.Length);
75-
Response.Headers.Add("Accept-Ranges", "bytes");
75+
Response.Headers["Accept-Ranges"] = "bytes";
7676
Response.Headers.Remove("Cache-Control");
7777
return File(stream, "audio/wav");
7878
}

eFormAPI/eFormAPI.Web/Hosting/Security/ClaimsTransformer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public async Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal)
7777

7878
if (auth == null)
7979
{
80-
_httpContextAccessor.HttpContext.Response.Headers.Add(AuthConsts.UpdateHeaderName, AuthConsts.UpdateHeaderValue);
80+
_httpContextAccessor.HttpContext.Response.Headers[AuthConsts.UpdateHeaderName] = AuthConsts.UpdateHeaderValue;
8181
}
8282
else
8383
{
@@ -86,7 +86,7 @@ public async Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal)
8686

8787
if (timeValue != auth.TimeStamp)
8888
{
89-
_httpContextAccessor.HttpContext.Response.Headers.Add(AuthConsts.UpdateHeaderName, AuthConsts.UpdateHeaderValue);
89+
_httpContextAccessor.HttpContext.Response.Headers[AuthConsts.UpdateHeaderName] = AuthConsts.UpdateHeaderValue;
9090
}
9191

9292
// Add claims

eFormAPI/eFormAPI.Web/Infrastructure/Models/SelectableList/AdvEntitySelectableGroupEditModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ namespace eFormAPI.Web.Infrastructure.Models.SelectableList;
3131

3232
public class AdvEntitySelectableGroupEditModel
3333
{
34-
public string Name { get; set; }
35-
public string GroupUid { get; set; }
36-
public string Description { get; set; }
34+
public required string Name { get; set; }
35+
public required string GroupUid { get; set; }
36+
public required string Description { get; set; }
3737
public List<EntityItem>? EntityItemModels { get; set; }
3838
}

eFormAPI/eFormAPI.Web/Services/WordProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void AddHtml(string html)
5959
}
6060

6161
var converter = new HtmlConverter(mainPart);
62-
converter.ParseHtml(html);
62+
converter.ParseBody(html);
6363
mainPart.Document.Save();
6464
}
6565

0 commit comments

Comments
 (0)