single private title return bug fixed

This commit is contained in:
2023-04-15 13:43:05 +03:00
parent 1e0d1002d7
commit ffa66977c3
3 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -39,13 +39,13 @@ const get_titles_for_language = async (start, count, language) => {
return (!titles.length) ? null : titles
}
const get_private_title_with_key = async (key) => {
const get_private_titles_with_key = async (key) => {
var db = await get_db()
if (!db) {
return null
}
var titles = await db.collection('private_title').find({key:key}).toArray()
return (!titles.length) ? null : titles[0]
return (!titles.length) ? null : titles
}
const get_free_session_servers = async (title) => {
@@ -229,7 +229,7 @@ module.exports = {
remove_active_session,
get_session_websocket_url,
get_titles_for_language,
get_private_title_with_key,
get_private_titles_with_key,
get_statuses,
get_all_session_servers,
add_error,