+
+
-
- {{
- alias.description | truncate(25)
- }}
+
+
+
+
|
-
+
{{ alias.emails_forwarded }}
|
-
+
{{ alias.emails_blocked }}
|
-
+
+ {{ alias.emails_replied }}
+
+ |
+
+
|
No aliases found for that search!
|
diff --git a/resources/js/pages/Domains.vue b/resources/js/pages/Domains.vue
index f21aae1..60314e4 100644
--- a/resources/js/pages/Domains.vue
+++ b/resources/js/pages/Domains.vue
@@ -428,7 +428,11 @@ export default {
})
.catch(error => {
this.addDomainLoading = false
- this.error()
+ if (error.response.status == 422) {
+ this.error(error.response.data.errors.domain[0])
+ } else {
+ this.error()
+ }
})
},
openDeleteModal(id) {
diff --git a/resources/js/pages/Recipients.vue b/resources/js/pages/Recipients.vue
index a8e269a..027cde1 100644
--- a/resources/js/pages/Recipients.vue
+++ b/resources/js/pages/Recipients.vue
@@ -473,7 +473,11 @@ export default {
})
.catch(error => {
this.addRecipientLoading = false
- this.error()
+ if (error.response.status == 422) {
+ this.error(error.response.data.errors.email[0])
+ } else {
+ this.error()
+ }
})
},
resendVerification(id) {
@@ -487,7 +491,6 @@ export default {
})
.catch(error => {
this.resendVerificationLoading = false
- console.log(error.response)
if (error.response.status === 429) {
this.error('You can only resend the email once every 5 minutes')
} else {
diff --git a/tests/Feature/DomainsTest.php b/tests/Feature/DomainsTest.php
index dc044b6..bdd0659 100644
--- a/tests/Feature/DomainsTest.php
+++ b/tests/Feature/DomainsTest.php
@@ -114,6 +114,30 @@ class DomainsTest extends TestCase
->assertJsonValidationErrors('domain');
}
+ /** @test */
+ public function new_domain_must_not_be_local()
+ {
+ $response = $this->json('POST', '/domains', [
+ 'domain' => config('anonaddy.domain')
+ ]);
+
+ $response
+ ->assertStatus(422)
+ ->assertJsonValidationErrors('domain');
+ }
+
+ /** @test */
+ public function new_domain_must_not_be_local_subdomain()
+ {
+ $response = $this->json('POST', '/domains', [
+ 'domain' => 'subdomain'.config('anonaddy.domain')
+ ]);
+
+ $response
+ ->assertStatus(422)
+ ->assertJsonValidationErrors('domain');
+ }
+
/** @test */
public function user_can_activate_domain()
{
|