mirror of https://github.com/kiwix/libkiwix.git
List of languages entry in /catalog/v2/root.xml
Added a new entry in /catalog/v2/root.xml that points to a not-yet-existing list of languages navigation feed.
This commit is contained in:
parent
49322f5961
commit
b2027b397c
|
@ -74,7 +74,8 @@ std::unique_ptr<Response> InternalServer::handle_catalog_v2_root(const RequestCo
|
||||||
{"endpoint_root", m_root + "/catalog/v2"},
|
{"endpoint_root", m_root + "/catalog/v2"},
|
||||||
{"feed_id", gen_uuid(m_library_id)},
|
{"feed_id", gen_uuid(m_library_id)},
|
||||||
{"all_entries_feed_id", gen_uuid(m_library_id + "/entries")},
|
{"all_entries_feed_id", gen_uuid(m_library_id + "/entries")},
|
||||||
{"category_list_feed_id", gen_uuid(m_library_id + "/categories")}
|
{"category_list_feed_id", gen_uuid(m_library_id + "/categories")},
|
||||||
|
{"language_list_feed_id", gen_uuid(m_library_id + "/languages")}
|
||||||
},
|
},
|
||||||
"application/atom+xml;profile=opds-catalog;kind=navigation"
|
"application/atom+xml;profile=opds-catalog;kind=navigation"
|
||||||
);
|
);
|
||||||
|
|
|
@ -32,4 +32,13 @@
|
||||||
<id>{{category_list_feed_id}}</id>
|
<id>{{category_list_feed_id}}</id>
|
||||||
<content type="text">List of all categories in this catalog.</content>
|
<content type="text">List of all categories in this catalog.</content>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<title>List of languages</title>
|
||||||
|
<link rel="subsection"
|
||||||
|
href="{{endpoint_root}}/languages"
|
||||||
|
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
|
||||||
|
<updated>{{date}}</updated>
|
||||||
|
<id>{{language_list_feed_id}}</id>
|
||||||
|
<content type="text">List of all languages in this catalog.</content>
|
||||||
|
</entry>
|
||||||
</feed>
|
</feed>
|
||||||
|
|
|
@ -942,6 +942,15 @@ TEST_F(LibraryServerTest, catalog_v2_root)
|
||||||
<id>12345678-90ab-cdef-1234-567890abcdef</id>
|
<id>12345678-90ab-cdef-1234-567890abcdef</id>
|
||||||
<content type="text">List of all categories in this catalog.</content>
|
<content type="text">List of all categories in this catalog.</content>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<title>List of languages</title>
|
||||||
|
<link rel="subsection"
|
||||||
|
href="/catalog/v2/languages"
|
||||||
|
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
|
||||||
|
<updated>YYYY-MM-DDThh:mm:ssZ</updated>
|
||||||
|
<id>12345678-90ab-cdef-1234-567890abcdef</id>
|
||||||
|
<content type="text">List of all languages in this catalog.</content>
|
||||||
|
</entry>
|
||||||
</feed>
|
</feed>
|
||||||
)";
|
)";
|
||||||
EXPECT_EQ(maskVariableOPDSFeedData(r->body), expected_output);
|
EXPECT_EQ(maskVariableOPDSFeedData(r->body), expected_output);
|
||||||
|
|
Loading…
Reference in New Issue