itizawa 6 лет назад
Родитель
Сommit
1499b1b384
1 измененных файлов с 25 добавлено и 2 удалено
  1. 25 2
      src/server/routes/apiv3/notification-setting.js

+ 25 - 2
src/server/routes/apiv3/notification-setting.js

@@ -224,13 +224,36 @@ module.exports = (crowi) => {
 
   });
 
-  // TODO swagger
+  /**
+   * @swagger
+   *
+   *    /_api/v3/notification-setting/user-notification/{id}:
+   *      delete:
+   *        tags: [NotificationSetting, apiv3]
+   *        description: delete user trigger notification pattern
+   *        parameters:
+   *          - name: id
+   *            in: path
+   *            required: true
+   *            description: id of user trigger notification
+   *            schema:
+   *              type: string
+   *        responses:
+   *          200:
+   *            description: Succeeded to delete user trigger notification pattern
+   *            content:
+   *              application/json:
+   *                schema:
+   *                  properties:
+   *                    deletedNotificaton:
+   *                      type: object
+   *                      description: deleted notification
+   */
   router.delete('/user-notification/:id', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
     const { id } = req.params;
 
     try {
       const deletedNotificaton = await UpdatePost.remove(id);
-      console.log(deletedNotificaton);
       return res.apiv3(deletedNotificaton);
     }
     catch (err) {