diff options
Diffstat (limited to 'server/lib/Validator/Email.php')
-rw-r--r-- | server/lib/Validator/Email.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/lib/Validator/Email.php b/server/lib/Validator/Email.php index 2d82fd0..b0e0c44 100644 --- a/server/lib/Validator/Email.php +++ b/server/lib/Validator/Email.php @@ -2,8 +2,8 @@ namespace LookupServer\Validator; -use \Psr\Http\Message\ServerRequestInterface as Request; -use \Psr\Http\Message\ResponseInterface as Response; +use Psr\Http\Message\ResponseInterface as Response; +use Psr\Http\Message\ServerRequestInterface as Request; class Email { @@ -54,8 +54,7 @@ class Email { $stmt->closeCursor(); if ($validation === false) { - $response->withStatus(403); - $response->getBody()->write('Invalid token'); + return $response->withStatus(403, 'Invalid token'); } else { $stmt = $this->db->prepare('UPDATE store SET valid = 1 WHERE id = :storeId'); $stmt->bindParam('storeId', $validation['storeId']); |