From 9542c47fc2a04eb16083a9147d60c2ae20bd8ad2 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Date: Mon, 17 Jun 2019 19:32:51 +0200 Subject: [PATCH] Reduced `getIndex` response data to only expose minimal and necessary data to the API. --- mylar/api.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mylar/api.py b/mylar/api.py index 2e438731..d357a8e1 100644 --- a/mylar/api.py +++ b/mylar/api.py @@ -183,7 +183,18 @@ class Api(object): self.data = self._error_with_message('Incorrect username or password.') def _getIndex(self, **kwargs): - self.data = self._dic_from_query('SELECT * from comics order by ComicSortName COLLATE NOCASE') + self.data = self._dic_from_query( + "SELECT ComicID as id,\ + ComicName as name,\ + ComicImageURL as imageURL,\ + Status as status,\ + ComicPublisher as publisher,\ + ComicYear as year,\ + LatestIssue as latestIssue,\ + Total as totalIssues,\ + DetailURL as detailsURL\ + FROM comics \ + ORDER BY ComicSortName COLLATE NOCASE") return def _getReadList(self, **kwargs):