WESEEK Kaito 6 лет назад
Родитель
Сommit
f5fc263412

+ 1 - 1
resource/locales/en-US/translation.json

@@ -705,7 +705,7 @@
     "send_new_password": "Please send the new password to the user.",
     "password_never_seen": "The temporary password can never be retrieved after this screen is closed.",
     "reset_password": "Reset Password",
-    "related_username": "Related user's {{username}}",
+    "related_username": "Related user's ",
     "accept": "Accept",
     "deactivate_account":"Deactivate Account",
     "your_own":"You cannot deactivate your own account",

+ 1 - 1
resource/locales/ja/translation.json

@@ -689,7 +689,7 @@
     "send_new_password": "新規発行したパスワードを、対象ユーザーへ連絡してください。",
     "password_never_seen": "表示されたパスワードはこの画面を閉じると二度と表示できませんのでご注意ください。",
     "reset_password": "パスワードの再発行",
-    "related_username": "関連付けられているユーザーの {{username}}",
+    "related_username": "関連付けられているユーザーの ",
     "accept": "承認する",
     "deactivate_account": "アカウント停止",
     "your_own": "自分自身のアカウントを停止することはできません",

+ 1 - 2
src/client/js/components/Admin/ManageExternalAccount.jsx

@@ -8,7 +8,7 @@ import { createSubscribedElement } from '../UnstatedUtils';
 import AppContainer from '../../services/AppContainer';
 import AdminExternalAccountsContainer from '../../services/AdminExternalAccountsContainer';
 import ExternalAccountTable from './Users/ExternalAccountTable';
-import { toastSuccess, toastError } from '../../util/apiNotification';
+import { toastError } from '../../util/apiNotification';
 
 
 class ManageExternalAccount extends React.Component {
@@ -26,7 +26,6 @@ class ManageExternalAccount extends React.Component {
   async handleExternalAccountPage(selectedPage) {
     try {
       await this.props.adminExternalAccountsContainer.retrieveExternalAccountsByPagingNum(selectedPage);
-      toastSuccess(' Success ');
     }
     catch (err) {
       toastError(err);

+ 1 - 1
src/client/js/components/Admin/Users/ExternalAccountTable.jsx

@@ -42,7 +42,7 @@ class ExternalAccountTable extends React.Component {
             <tr>
               <th width="120px">{ t('user_management.authentication_provider') }</th>
               <th><code>accountId</code></th>
-              <th>{ t('user_management.related_username', { username: 'username' }) }</th>
+              <th>{ t('user_management.related_username') }<code>username</code></th>
               <th>
                 { t('user_management.password_setting') }
                 <div

+ 0 - 15
src/client/js/services/AdminExternalAccountsContainer.js

@@ -33,21 +33,6 @@ export default class AdminExternalAccountsContainer extends Container {
     return 'AdminExternalAccountsContainer';
   }
 
-  /**
-   * update external-account
-   *
-   * @memberOf AdminExternalAccountsContainer
-   * @param {object} param update param for external account
-   * @return {object} response object
-   */
-  async updateExternalAccount(param) {
-    const res = await this.appContainer.apiv3.put(`/users/external-accounts/${this.state.externalAccounts._id}`, param);
-    const { exteranalAccounts } = res.data;
-
-    await this.setState({ exteranalAccounts });
-
-    return res;
-  }
 
   /**
    * syncExternalAccounts of selectedPage

+ 4 - 6
src/server/routes/apiv3/users.js

@@ -358,10 +358,9 @@ module.exports = (crowi) => {
       return res.apiv3({ paginateResult });
     }
     catch (err) {
-      const msg = 'Error occurred in fetching external-account list';
+      const msg = 'Error occurred in fetching external-account list  ';
       logger.error(msg, err);
-      const errMsg = Object.assign(msg, err.message);
-      return res.apiv3Err(new ErrorV3(errMsg, 'external-account-list-fetch-failed'));
+      return res.apiv3Err(new ErrorV3(msg + err.message, 'external-account-list-fetch-failed'), 500);
     }
   });
 
@@ -402,10 +401,9 @@ module.exports = (crowi) => {
       return res.apiv3({ externalAccount });
     }
     catch (err) {
-      const msg = 'Error occurred in deleting a external account';
+      const msg = 'Error occurred in deleting a external account  ';
       logger.error(msg, err);
-      const errMsg = Object.assign(msg, err.message);
-      return res.apiv3Err(new ErrorV3(errMsg, 'extenral-account-delete-failed'));
+      return res.apiv3Err(new ErrorV3(msg + err.message, 'extenral-account-delete-failed'));
     }
   });
   return router;