From 16695a4b6d247b87c3383df2cb0531612f8a8bbe Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 17 Apr 2023 08:04:52 +0000 Subject: [PATCH] fix errors --- app/config/locale/templates.php | 1 - app/controllers/api/projects.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/config/locale/templates.php b/app/config/locale/templates.php index 601c941155..98f6a8bb93 100644 --- a/app/config/locale/templates.php +++ b/app/config/locale/templates.php @@ -6,7 +6,6 @@ return [ 'magicSession', 'recovery', 'invitation', - 'certificate' ], 'sms' => [ 'verification', diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 6dbb53d824..1f91142ebf 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1698,7 +1698,7 @@ App::patch('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PROJECT) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') + ->param('type', '', new WhiteList(Config::getParam('locale-templates')['email'] ?? []), 'Template type') ->param('locale', '', fn($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) ->param('senderName', '', new Text(255), 'Name of the email sender') ->param('senderEmail', '', new Email(), 'Email of the sender') @@ -1786,7 +1786,7 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_EMAIL_TEMPLATE) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') + ->param('type', '', new WhiteList(Config::getParam('locale-templates')['email'] ?? []), 'Template type') ->param('locale', '', new Text(6), 'Template locale') ->inject('response') ->inject('dbForConsole')