refactor
This commit is contained in:
parent
a266f7ec1f
commit
f70712865e
3 changed files with 5 additions and 5 deletions
|
@ -524,8 +524,8 @@ return [
|
|||
'description' => 'The project key has expired. Please generate a new key using the Appwrite console.',
|
||||
'code' => 401,
|
||||
],
|
||||
Exception::PROJECT_DEFAULT_TEMPLATE_DELETION => [
|
||||
'name' => Exception::PROJECT_DEFAULT_TEMPLATE_DELETION,
|
||||
Exception::PROJECT_TEMPLATE_DEFAULT_DELETION => [
|
||||
'name' => Exception::PROJECT_TEMPLATE_DEFAULT_DELETION,
|
||||
'description' => 'The default template for the project cannot be deleted.',
|
||||
'code' => 401,
|
||||
],
|
||||
|
|
|
@ -1857,7 +1857,7 @@ App::DELETE('/v1/projects/:projectId/templates/sms/:type/:locale')
|
|||
$template = $templates['sms.' . $type . '-' . $locale] ?? null;
|
||||
|
||||
if (is_null($template)) {
|
||||
throw new Exception(Exception::PROJECT_DEFAULT_TEMPLATE_DELETION);
|
||||
throw new Exception(Exception::PROJECT_TEMPLATE_DEFAULT_DELETION);
|
||||
}
|
||||
|
||||
unset($template['sms.' . $type . '-' . $locale]);
|
||||
|
@ -1898,7 +1898,7 @@ App::DELETE('/v1/projects/:projectId/templates/email/:type/:locale')
|
|||
$template = $templates['email.' . $type . '-' . $locale] ?? null;
|
||||
|
||||
if (is_null($template)) {
|
||||
throw new Exception(Exception::PROJECT_DEFAULT_TEMPLATE_DELETION);
|
||||
throw new Exception(Exception::PROJECT_TEMPLATE_DEFAULT_DELETION);
|
||||
}
|
||||
|
||||
unset($templates['email.' . $type . '-' . $locale]);
|
||||
|
|
|
@ -164,7 +164,7 @@ class Exception extends \Exception
|
|||
public const PROJECT_RESERVED_PROJECT = 'project_reserved_project';
|
||||
public const PROJECT_KEY_EXPIRED = 'project_key_expired';
|
||||
|
||||
public const PROJECT_DEFAULT_TEMPLATE_DELETION = 'project_default_template_deletion';
|
||||
public const PROJECT_TEMPLATE_DEFAULT_DELETION = 'project_template_default_deletion';
|
||||
|
||||
/** Webhooks */
|
||||
public const WEBHOOK_NOT_FOUND = 'webhook_not_found';
|
||||
|
|
Loading…
Reference in a new issue