Sort FAQ entries by editor-defined order within each topic

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