Yuki Takei 6 лет назад
Родитель
Сommit
2c8d5f65e1
1 измененных файлов с 10 добавлено и 1 удалено
  1. 10 1
      src/server/routes/apiv3/search.js

+ 10 - 1
src/server/routes/apiv3/search.js

@@ -65,6 +65,15 @@ module.exports = (crowi) => {
    *      tags: [Search]
    *      summary: /search/indices
    *      description: Operate indices
+   *      parameters:
+   *        - in: query
+   *          name: operation
+   *          description: Operation type against to indices >
+   *            * `normalize` - Normalize indices
+   *            * `rebuild` - Rebuild indices
+   *          schema:
+   *            type: string
+   *            enum: [normalize, rebuild]
    *      responses:
    *        200:
    *          description: Return 200
@@ -86,7 +95,7 @@ module.exports = (crowi) => {
           throw new Error(`Unimplemented operation: ${operation}`);
       }
 
-      return res.status(200).send();
+      return res.status(200).send({ message: 'Operation is successfully requested.' });
     }
     catch (err) {
       return res.apiv3Err(err);