From afd4375e4dc52f8a19e053a1e9c427d67e162470 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 25 Apr 2023 16:01:55 +0300 Subject: [PATCH] add hostPagesTotal info to the hosts API --- config/app.php.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/app.php.txt b/config/app.php.txt index 66ad4d5..25953fd 100644 --- a/config/app.php.txt +++ b/config/app.php.txt @@ -190,4 +190,13 @@ define('API_HOSTS_ENABLED', true); * Database host fields comma separated or * to share all the fields * */ -define('API_HOSTS_FIELDS', '`scheme`,`name`,`port`,`crawlPageLimit`,`robots`,`robotsPostfix`,`timeAdded`,`timeUpdated`'); // string: *|field names comma separated \ No newline at end of file +define('API_HOSTS_FIELDS', + '`host`.`scheme`, + `host`.`name`, + `host`.`port`, + `host`.`crawlPageLimit`, + `host`.`robots`, + `host`.`robotsPostfix`, + `host`.`timeAdded`, + `host`.`timeUpdated`, + (SELECT COUNT(*) FROM `hostPage` WHERE `hostPage`.`hostId` = `host`.`hostId`) AS `hostPagesTotal`'); // string: *|field names comma separated \ No newline at end of file