mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
OPDS can be filtered using more than one language
From now on, the `lang` parameter of the /catalog/search, /catalog/v2/entries, and /catalog/v2/partial_entries endpoints is interpreted as a comma-separated list of languages.
This commit is contained in:
committed by
Matthieu Gautier
parent
c0d027e8a4
commit
7d69ece27d
@ -344,10 +344,12 @@ TEST_F(LibraryServerTest, catalog_search_by_language)
|
||||
" <id>12345678-90ab-cdef-1234-567890abcdef</id>\n"
|
||||
" <title>Filtered zims (lang=eng,fra)</title>\n"
|
||||
" <updated>YYYY-MM-DDThh:mm:ssZ</updated>\n"
|
||||
" <totalResults>0</totalResults>\n"
|
||||
" <totalResults>2</totalResults>\n"
|
||||
" <startIndex>0</startIndex>\n"
|
||||
" <itemsPerPage>0</itemsPerPage>\n"
|
||||
" <itemsPerPage>2</itemsPerPage>\n"
|
||||
CATALOG_LINK_TAGS
|
||||
RAY_CHARLES_CATALOG_ENTRY
|
||||
CHARLES_RAY_CATALOG_ENTRY
|
||||
"</feed>\n"
|
||||
);
|
||||
}
|
||||
@ -727,9 +729,11 @@ TEST_F(LibraryServerTest, catalog_v2_entries_filtered_by_language)
|
||||
CATALOG_V2_ENTRIES_PREAMBLE("?lang=eng,fra")
|
||||
" <title>Filtered Entries (lang=eng,fra)</title>\n"
|
||||
" <updated>YYYY-MM-DDThh:mm:ssZ</updated>\n"
|
||||
" <totalResults>0</totalResults>\n"
|
||||
" <totalResults>2</totalResults>\n"
|
||||
" <startIndex>0</startIndex>\n"
|
||||
" <itemsPerPage>0</itemsPerPage>\n"
|
||||
" <itemsPerPage>2</itemsPerPage>\n"
|
||||
RAY_CHARLES_CATALOG_ENTRY
|
||||
CHARLES_RAY_CATALOG_ENTRY
|
||||
"</feed>\n"
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user