Sotaro KARASAWA 9 лет назад
Родитель
Сommit
aac47fa10a

+ 1 - 1
lib/routes/page.js

@@ -844,7 +844,7 @@ module.exports = function(crowi, app) {
 
         return res.json(ApiResponse.success(result));
       }).catch(function(err) {
-        return res.json(ApiResponse.error('エラーが発生しました。ページを更新できません。'));
+        return res.json(ApiResponse.error('Failed to update page.'));
       });
     });
   };

+ 1 - 1
lib/util/middlewares.js

@@ -189,7 +189,7 @@ exports.loginRequired = function(crowi, app) {
 
 exports.accessTokenParser = function(crowi, app) {
   return function(req, res, next) {
-    var accessToken = req.query.access_token || req.body.access_token || null;
+    var accessToken = req.query.access_token || req.body.access_token || req.get('Authorization') || null;
     if (!accessToken) {
       return next();
     }

+ 2 - 2
lib/views/me/index.html

@@ -127,8 +127,8 @@
               </div>
             </form>
             {% else %}
-            * 画像をアップロードをするための設定がされていません。<br>
-            * アップロードできるようにするには、AWS またはローカルアップロードの設定をしてください。<br>
+            * {{ t('page_me.form_help.profile_image1') }}<br>
+            * {{ t('page_me.form_help.profile_image2') }}<br>
             {% endif %}
           </div>
         </div>

+ 2 - 0
locales/en-US/translation.json

@@ -97,6 +97,8 @@
 
   "page_me": {
     "form_help": {
+      "profile_image1": "Image upload settings not completed.",
+      "profile_image2": "Set up AWS or enable local uploads.",
       "google_connect1": "With Google Connect, you can sign in with your Google Account.",
       "google_connect2": "Only Google Apps accounts with the following email addresses are connectable Google accounts:",
       "google_disconnect1": "If you disconnect your Google account, you will be unable to sign in using Google Authentication",

+ 2 - 0
locales/ja/translation.json

@@ -97,6 +97,8 @@
 
   "page_me": {
     "form_help": {
+      "profile_image1": "画像をアップロードをするための設定がされていません。",
+      "profile_image2": "アップロードできるようにするには、AWS またはローカルアップロードの設定をしてください。",
       "google_connect1": "Googleコネクトをすると、Googleアカウントでログイン可能になります。",
       "google_connect2": "コネクト可能なGoogleアカウントは、以下のメールアドレスの発行できるGoogle Appsアカウントに限られます。",
       "google_disconnect1": "接続を解除すると、Googleでログインができなくなります。",