Commit 6afc44ac authored by kay899's avatar kay899 Committed by Nicolas Widart

Kay899 patch 1 (#326)

* Fixing typo error for lang

1) Fixing a typo error for success message
2) Use individual success message for deleting an API key
With this change everyone can add his own translations

* Adding new translation key

Needed for fix in ApiKeysController
parent 4af6d93b
...@@ -57,6 +57,7 @@ return [ ...@@ -57,6 +57,7 @@ return [
'you have no api keys' => 'You have no API keys.', 'you have no api keys' => 'You have no API keys.',
'generate one' => 'Generate one.', 'generate one' => 'Generate one.',
'token generated' => 'API token was successfully generated', 'token generated' => 'API token was successfully generated',
'token deleted' => 'API token was successfully deleted',
'list user' => 'List users', 'list user' => 'List users',
'create user' => 'Create users', 'create user' => 'Create users',
'edit user' => 'Edit users', 'edit user' => 'Edit users',
......
...@@ -40,7 +40,7 @@ class ApiKeysController extends AdminBaseController ...@@ -40,7 +40,7 @@ class ApiKeysController extends AdminBaseController
$this->userToken->generateFor($this->auth->id()); $this->userToken->generateFor($this->auth->id());
return redirect()->route('admin.account.api.index') return redirect()->route('admin.account.api.index')
->withSuccess(trans('user:users.token generated')); ->withSuccess(trans('user::users.token generated'));
} }
public function destroy(UserToken $userToken) public function destroy(UserToken $userToken)
...@@ -48,6 +48,6 @@ class ApiKeysController extends AdminBaseController ...@@ -48,6 +48,6 @@ class ApiKeysController extends AdminBaseController
$this->userToken->destroy($userToken); $this->userToken->destroy($userToken);
return redirect()->route('admin.account.api.index') return redirect()->route('admin.account.api.index')
->withSuccess(trans('core::core.messages.resource deleted', ['name' => 'Api Token'])); ->withSuccess(trans('user::users.token deleted'));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment