From 4fee656f966903205487a317b10a96c0a40ae27e Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 1 May 2018 10:10:19 +0200 Subject: [PATCH] Prepared version 1.9.0 --- module/Rest/config/routes.config.php | 6 ++++++ module/Rest/src/Action/CreateShortcodeAction.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module/Rest/config/routes.config.php b/module/Rest/config/routes.config.php index a1bd8dca..28b7cf5f 100644 --- a/module/Rest/config/routes.config.php +++ b/module/Rest/config/routes.config.php @@ -21,6 +21,12 @@ return [ 'middleware' => Action\CreateShortcodeAction::class, 'allowed_methods' => [RequestMethod::METHOD_POST], ], +// [ +// 'name' => Action\CreateShortcodeAction::class, +// 'path' => '/short-codes', +// 'middleware' => Action\CreateShortcodeAction::class, +// 'allowed_methods' => [RequestMethod::METHOD_GET], +// ], [ 'name' => Action\EditShortCodeAction::class, 'path' => '/short-codes/{shortCode}', diff --git a/module/Rest/src/Action/CreateShortcodeAction.php b/module/Rest/src/Action/CreateShortcodeAction.php index b3c093d3..d880d552 100644 --- a/module/Rest/src/Action/CreateShortcodeAction.php +++ b/module/Rest/src/Action/CreateShortcodeAction.php @@ -80,7 +80,7 @@ class CreateShortcodeAction extends AbstractRestAction $this->logger->warning('Provided Invalid URL.' . PHP_EOL . $e); return new JsonResponse([ 'error' => RestUtils::getRestErrorCodeFromException($e), - 'message' => sprintf( + 'message' => \sprintf( $this->translator->translate('Provided URL %s is invalid. Try with a different one.'), $longUrl ), @@ -89,7 +89,7 @@ class CreateShortcodeAction extends AbstractRestAction $this->logger->warning('Provided non-unique slug.' . PHP_EOL . $e); return new JsonResponse([ 'error' => RestUtils::getRestErrorCodeFromException($e), - 'message' => sprintf( + 'message' => \sprintf( $this->translator->translate('Provided slug %s is already in use. Try with a different one.'), $customSlug ),