Sort FAQ entries by editor-defined order within each topic
This commit is contained in:
1 parent
ab4a1dd8fc
commit
28944c155a
1 file changed
+5
-4
@@ -71,13 +71,14 @@ public sealed class PocketBaseClient(HttpClient httpClient)
|
||||
|
||||
/// <summary>
|
||||
/// Gets all public FAQ entries, ordered by <see cref="Faq.Topic"/>, then by
|
||||
/// <see cref="Faq.Question"/>.
|
||||
/// the editor's <c>order</c> within each topic.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The second sort key makes the order total: sorting by topic alone leaves
|
||||
/// entries within a topic in an undefined order, so the same content could
|
||||
/// render differently between requests. Adding the question as a tie-breaker
|
||||
/// keeps the FAQ list and any teaser drawn from it stable.
|
||||
/// render differently between requests. The per-topic <c>order</c> field lets
|
||||
/// an editor arrange the questions within a topic and keeps that arrangement
|
||||
/// stable between requests; the topic groups themselves stay alphabetical.
|
||||
/// </remarks>
|
||||
/// <inheritdoc cref="GetPagesAsync" path="/param"/>
|
||||
/// <returns>
|
||||
@@ -85,7 +86,7 @@ public sealed class PocketBaseClient(HttpClient httpClient)
|
||||
/// </returns>
|
||||
/// <inheritdoc cref="GetPagesAsync" path="/exception"/>
|
||||
public Task<IReadOnlyList<Faq>> GetFaqsAsync(CancellationToken token = default)
|
||||
=> GetRecordsAsync<Faq>("faqs", "topic,question", token);
|
||||
=> GetRecordsAsync<Faq>("faqs", "topic,order", token);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all public records of a collection in a single request.
|
||||
|
||||
Reference in new issue
Block a user