yusuketk 6 лет назад
Родитель
Сommit
00fcd69464
2 измененных файлов с 17 добавлено и 11 удалено
  1. 1 1
      src/client/js/components/Admin/App/AppSetting.jsx
  2. 16 10
      src/server/routes/apiv3/app-settings.js

+ 1 - 1
src/client/js/components/Admin/App/AppSetting.jsx

@@ -40,7 +40,7 @@ class AppSetting extends React.Component {
 
 
     try {
     try {
       await this.props.appContainer.apiv3.put('/app-settings/appSetting', params);
       await this.props.appContainer.apiv3.put('/app-settings/appSetting', params);
-      toastSuccess(t('app_setting.updated_app_setting'));
+      toastSuccess(t('Updated app setting'));
     }
     }
     catch (err) {
     catch (err) {
       toastError(err);
       toastError(err);

+ 16 - 10
src/server/routes/apiv3/app-settings.js

@@ -23,7 +23,7 @@ const validator = {
 /**
 /**
  * @swagger
  * @swagger
  *  tags:
  *  tags:
- *    name: AppSetting
+ *    name: AppSettings
  */
  */
 
 
 /**
 /**
@@ -61,8 +61,8 @@ module.exports = (crowi) => {
    *
    *
    *    /app-setting/lineBreak:
    *    /app-setting/lineBreak:
    *      put:
    *      put:
-   *        tags: [AppSetting]
-   *        description: Update lineBreak setting
+   *        tags: [AppSettings]
+   *        description: Update app setting
    *        requestBody:
    *        requestBody:
    *          required: true
    *          required: true
    *          content:
    *          content:
@@ -70,21 +70,27 @@ module.exports = (crowi) => {
    *              schema:
    *              schema:
    *                type: object
    *                type: object
    *                properties:
    *                properties:
-   *                  isEnabledLinebreaks:
-   *                    description: enable lineBreak
-   *                    type: boolean
-   *                  isEnabledLinebreaksInComments:
-   *                    description: enable lineBreak in comment
+   *                  title:
+   *                    type: String
+   *                    description: site name show on page header and tilte of HTML
+   *                  confidential:
+   *                    type: String
+   *                    description: confidential show on page header
+   *                  globalLang:
+   *                    type: String
+   *                    description: language set when create user
+   *                  fileUpload:
    *                    type: boolean
    *                    type: boolean
+   *                    description: enable upload file except image file
    *        responses:
    *        responses:
    *          200:
    *          200:
-   *            description: Succeeded to update lineBreak setting
+   *            description: Succeeded to update app setting
    *            content:
    *            content:
    *              application/json:
    *              application/json:
    *                schema:
    *                schema:
    *                  properties:
    *                  properties:
    *                    status:
    *                    status:
-   *                      $ref: '#/components/schemas/LineBreakParams'
+   *                      $ref: '#/components/schemas/appSettingParams'
    */
    */
   router.put('/appSetting', loginRequiredStrictly, adminRequired, csrf, validator.appSetting, ApiV3FormValidator, async(req, res) => {
   router.put('/appSetting', loginRequiredStrictly, adminRequired, csrf, validator.appSetting, ApiV3FormValidator, async(req, res) => {