Fix FLEXIAPI-395 Remove config()->set('app.sip_domain') and directly use the correct domain

This commit is contained in:
Timothée Jaussoin 2025-09-29 14:54:31 +02:00
parent a98c8764d5
commit b0de4841f6
2 changed files with 4 additions and 5 deletions

View file

@ -17,6 +17,7 @@ v2.1
- Fix FLEXIAPI-385 Use domains and not hosts in the EmailServer endpoints as defined in the API documentation - Fix FLEXIAPI-385 Use domains and not hosts in the EmailServer endpoints as defined in the API documentation
- Fix FLEXIAPI-391 Add missing account view attribute in the actions.delete view - Fix FLEXIAPI-391 Add missing account view attribute in the actions.delete view
- Fix FLEXIAPI-392 Fix the recover_by_code view and use the account space object - Fix FLEXIAPI-392 Fix the recover_by_code view and use the account space object
- Fix FLEXIAPI-395 Remove config()->set('app.sip_domain') and directly use the correct domain
v2.0 v2.0
---- ----

View file

@ -42,7 +42,6 @@ class ApiSpaceWithMiddlewareTest extends TestCase
// Try to create a new user as an admin // Try to create a new user as an admin
$admin->generateUserApiKey(); $admin->generateUserApiKey();
config()->set('app.sip_domain', $space->domain);
$this->keyAuthenticated($admin) $this->keyAuthenticated($admin)
->json($this->method, 'http://' . $admin->domain . $this->accountRoute, [ ->json($this->method, 'http://' . $admin->domain . $this->accountRoute, [
@ -52,20 +51,19 @@ class ApiSpaceWithMiddlewareTest extends TestCase
])->assertStatus(403); ])->assertStatus(403);
// Unexpire the space and try again // Unexpire the space and try again
config()->set('app.sip_domain', $superAdmin->domain);
$space = $this->keyAuthenticated($superAdmin) $space = $this->keyAuthenticated($superAdmin)
->get($this->route . '/' . $admin->domain) ->get('http://' . $superAdmin->domain . $this->route . '/' . $admin->domain)
->json(); ->json();
$space['expire_at'] = Carbon::tomorrow()->toDateTimeString(); $space['expire_at'] = Carbon::tomorrow()->toDateTimeString();
$this->keyAuthenticated($superAdmin) $this->keyAuthenticated($superAdmin)
->json('PUT', $this->route . '/' . $admin->domain, $space) ->json('PUT', 'http://' . $superAdmin->domain . $this->route . '/' . $admin->domain, $space)
->assertStatus(200); ->assertStatus(200);
$this->keyAuthenticated($superAdmin) $this->keyAuthenticated($superAdmin)
->json($this->method, $this->accountRoute, [ ->json($this->method, 'http://' . $admin->domain . $this->accountRoute, [
'username' => 'new', 'username' => 'new',
'algorithm' => 'SHA-256', 'algorithm' => 'SHA-256',
'password' => '123456', 'password' => '123456',