diff --git a/CHANGELOG.md b/CHANGELOG.md index d08906f..dbebbdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,7 @@ v2.0 - Fix FLEXIAPI-372 Remove SESSION_DRIVER and CACHE_DRIVER and enforce them to file - Fix FLEXIAPI-375 Fix VcardsStorage table UUID size, recover the UUID from the stored vCard - Fix FLEXIAPI-378 Return a valid JSON containing the vCard and not the raw vCard in VcardsStorage controller +- Fix FLEXIAPI-385 Use domains and not hosts in the EmailServer endpoints as defined in the API documentation v1.6 ---- diff --git a/flexiapi/app/Http/Controllers/Api/Admin/EmailServerController.php b/flexiapi/app/Http/Controllers/Api/Admin/EmailServerController.php index 11f9f2f..a504bd9 100644 --- a/flexiapi/app/Http/Controllers/Api/Admin/EmailServerController.php +++ b/flexiapi/app/Http/Controllers/Api/Admin/EmailServerController.php @@ -11,14 +11,14 @@ use Illuminate\Http\Request; class EmailServerController extends Controller { - public function show(string $host) + public function show(string $domain) { - return Space::where('host', $host)->firstOrFail()->emailServer()->firstOrFail(); + return Space::where('domain', $domain)->firstOrFail()->emailServer()->firstOrFail(); } - public function store(CreateUpdate $request, string $host) + public function store(CreateUpdate $request, string $domain) { - $space = Space::where('host', $host)->firstOrFail(); + $space = Space::where('domain', $domain)->firstOrFail(); $emailServer = $space->emailServer ?? new SpaceEmailServer; $emailServer->space_id = $space->id; @@ -35,9 +35,9 @@ class EmailServerController extends Controller return $emailServer; } - public function destroy(string $host) + public function destroy(string $domain) { - $space = Space::where('host', $host)->firstOrFail(); + $space = Space::where('host', $domain)->firstOrFail(); return $space->emailServer->delete(); } }