updated workflow for building/deploying documentation; added missing api-method-description for EmailDomains-API

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-02-17 17:53:32 +01:00
parent 5ab322ab1d
commit a3486cc5b3
2 changed files with 13 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
name: build-docs name: build-documentation
on: on:
release: release:
@@ -11,4 +11,4 @@ jobs:
- env: - env:
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_TOKEN }}
run: | run: |
gh workflow run --repo Froxlor/Documentation build-docs -f ref=${{github.ref_name}} gh workflow run --repo Froxlor/Documentation build-and-deploy -f type=tags ref=${{github.ref_name}}

View File

@@ -30,10 +30,7 @@ use Froxlor\Api\ApiCommand;
use Froxlor\Api\ResourceEntity; use Froxlor\Api\ResourceEntity;
use Froxlor\Database\Database; use Froxlor\Database\Database;
use Froxlor\FroxlorLogger; use Froxlor\FroxlorLogger;
use Froxlor\Idna\IdnaWrapper;
use Froxlor\Settings; use Froxlor\Settings;
use Froxlor\UI\Response;
use Froxlor\Validate\Validate;
use PDO; use PDO;
/** /**
@@ -86,12 +83,14 @@ class EmailDomains extends ApiCommand implements ResourceEntity
FROM `" . TABLE_MAIL_VIRTUAL . "` e FROM `" . TABLE_MAIL_VIRTUAL . "` e
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` d ON d.id = e.domainid LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` d ON d.id = e.domainid
WHERE e.customerid IN (" . implode(", ", $customer_ids) . ") AND d.domain IS NOT NULL " . WHERE e.customerid IN (" . implode(", ", $customer_ids) . ") AND d.domain IS NOT NULL " .
$this->getSearchWhere($query_fields, true) . " GROUP BY e.domainid " . $this->getOrderBy() . $this->getLimit()); $this->getSearchWhere($query_fields,
true) . " GROUP BY e.domainid " . $this->getOrderBy() . $this->getLimit());
Database::pexecute($result_stmt, $query_fields, true, true); Database::pexecute($result_stmt, $query_fields, true, true);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$result[] = $row; $result[] = $row;
} }
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list email-domains"); $this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE,
"[API] list email-domains");
return $this->response([ return $this->response([
'count' => count($result), 'count' => count($result),
'list' => $result 'list' => $result
@@ -127,6 +126,8 @@ class EmailDomains extends ApiCommand implements ResourceEntity
} }
/** /**
* You cannot directly access email-domains
*
* @access admin, customer * @access admin, customer
* @return string json-encoded array * @return string json-encoded array
* @throws Exception * @throws Exception
@@ -140,6 +141,8 @@ class EmailDomains extends ApiCommand implements ResourceEntity
} }
/** /**
* You cannot directly add email-domains
*
* @access admin, customer * @access admin, customer
* @return string json-encoded array * @return string json-encoded array
* @throws Exception * @throws Exception
@@ -154,6 +157,7 @@ class EmailDomains extends ApiCommand implements ResourceEntity
/** /**
* toggle catchall flag of given email address either by id or email-address * toggle catchall flag of given email address either by id or email-address
*
* @access admin, customer * @access admin, customer
* @return string json-encoded array * @return string json-encoded array
* @throws Exception * @throws Exception
@@ -167,6 +171,8 @@ class EmailDomains extends ApiCommand implements ResourceEntity
} }
/** /**
* You cannot directly delete email-domains
*
* @access admin, customer * @access admin, customer
* @return string json-encoded array * @return string json-encoded array
* @throws Exception * @throws Exception