Skip to content

Commit ce974e2

Browse files
committed
tweaks
1 parent 0ff8cbf commit ce974e2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/CodeIndex.Common/SearchRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public record SearchRequest
2222
public bool ForWeb { get; set; }
2323
[MaxLength(32)]
2424
public string CodePK { get; set; }
25-
public bool IsEmpty => string.IsNullOrWhiteSpace(Content) && string.IsNullOrWhiteSpace(FileName) && string.IsNullOrWhiteSpace(FileExtension) && string.IsNullOrWhiteSpace(FilePath)
25+
public bool IsEmpty => string.IsNullOrWhiteSpace(Content) && string.IsNullOrWhiteSpace(FileName) && string.IsNullOrWhiteSpace(FileExtension) && string.IsNullOrWhiteSpace(FilePath) && string.IsNullOrWhiteSpace(CodePK)
2626
|| IndexPk == Guid.Empty;
2727
}
2828
}

src/CodeIndex.Server/Pages/SearchDetails.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@page "/Details/{CodePK}/{IndexPK}"
22
@page "/Details/{CodePK}/{IndexPK}/{ContentQuery}"
3+
@page "/Details/{CodePK}/{IndexPK}/{CaseSensitive:bool}/{PhaseQuery:bool}"
34
@page "/Details/{CodePK}/{IndexPK}/{ContentQuery}/{CaseSensitive:bool}/{PhaseQuery:bool}"
45
@inject HttpClient Client
56
@inject CodeIndexConfiguration Config

src/CodeIndex.Test/Common/SearchRequestTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public void TestConstructor()
3636
request.FileExtension = " ";
3737
request.FilePath = null;
3838
request.FileName = null;
39+
Assert.IsFalse(request.IsEmpty);
40+
41+
request.CodePK = null;
3942
Assert.IsTrue(request.IsEmpty);
4043
}
4144
}

0 commit comments

Comments
 (0)