Skip to content

Commit

Permalink
Fix a couple issues from sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
CorruptComputer committed Nov 10, 2024
1 parent 98a1747 commit 02affd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Backend/Bones.Api/Controllers/ProjectController.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Bones.Api.Models;
using Bones.Backend.Features.ProjectManagement.Projects.CreateProject;
Expand All @@ -23,7 +24,7 @@ public sealed class ProjectController(ISender sender) : BonesControllerBase(send
/// </summary>
/// <param name="Name">Name of the project to create</param>
/// <param name="OrganizationId">Optionally the organization that this should be created under, if not specified will be created for the requesting user.</param>
public record CreateProjectRequest(string Name, Guid? OrganizationId = null);
public record CreateProjectRequest([Required] string Name, Guid? OrganizationId = null);

/// <summary>
/// Creates a new project
Expand All @@ -49,7 +50,7 @@ public async Task<ActionResult> CreateProjectAsync([FromBody] CreateProjectReque
/// </summary>
/// <param name="OwnerType">OwnerType to get</param>
/// <param name="OrganizationId">Optionally the organization that this should be created under, if not specified will be created for the requesting user.</param>
public record GetProjectsByOwnerRequest(OwnershipType OwnerType, Guid? OrganizationId = null);
public record GetProjectsByOwnerRequest([Required] OwnershipType OwnerType, Guid? OrganizationId = null);

/// <summary>
/// Gets the projects for the current user, or specified organization
Expand Down
2 changes: 1 addition & 1 deletion Frontend/Bones.WebUI/Layout/MainLayout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected MudTheme Theme

private bool _open = false;

private record ProjectDropDownModel
private sealed record ProjectDropDownModel
{
public required string ProjectName { get; init; }

Expand Down

0 comments on commit 02affd5

Please sign in to comment.