Skip to content

Commit

Permalink
add small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Feb 15, 2024
1 parent d1e18cc commit d9e2239
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Nager.PublicSuffix.WebApi/Models/Author.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public class Author
{
public string? Name { get; set; }
public string? Email { get; set; }
public DateTime Date { get; set; }
public DateTime? Date { get; set; }
}
}
8 changes: 4 additions & 4 deletions src/Nager.PublicSuffix.WebApi/Models/CommitInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
{
public class CommitInfo
{
public Author Author { get; set; }
public Committer Committer { get; set; }
public Author? Author { get; set; }
public Committer? Committer { get; set; }
public string? Message { get; set; }
public Tree Tree { get; set; }
public Tree? Tree { get; set; }
public string? Url { get; set; }
public Verification Verification { get; set; }
public Verification? Verification { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Nager.PublicSuffix.WebApi/Models/Committer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public class Committer
{
public string? Name { get; set; }
public string? Email { get; set; }
public DateTime Date { get; set; }
public DateTime? Date { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Nager.PublicSuffix.WebApi/Models/GitHubCommit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
public class GitHubCommit
{
public string? Sha { get; set; }
public CommitInfo Commit { get; set; }
public File[] Files { get; set; }
public CommitInfo? Commit { get; set; }
public File[]? Files { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Nager.PublicSuffix.WebApi/Models/Verification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public class Verification
{
public bool Verified { get; set; }
public bool Verified { get; set; } = false;
public string? Reason { get; set; }
public string? Signature { get; set; }
public string? Payload { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Nager.PublicSuffix.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
httpClient.DefaultRequestHeaders.Add("User-Agent", "Nager.PublicSuffix");
var lastGitHubCommit = await httpClient.GetFromJsonAsync<GitHubCommit>("https://api.github.com/repos/publicsuffix/list/commits/master");
return lastGitHubCommit.Commit.Committer.Date;
return lastGitHubCommit?.Commit?.Committer?.Date;
})
.WithName("CheckLastCommit")
.WithOpenApi();
Expand Down

0 comments on commit d9e2239

Please sign in to comment.