@@ -190,7 +190,40 @@ module.exports = (crowi) => {
});
- // TODO swagger
+ /**
+ * @swagger
+ *
+ * /_api/v3/notification-setting/global-notification/{id}/enabled:
+ * put:
+ * tags: [NotificationSetting]
+ * description: toggle enabled global notification
+ * parameters:
+ * - name: id
+ * in: path
+ * required: true
+ * description: notification id for updated
+ * schema:
+ * type: string
+ * requestBody:
+ * content:
+ * application/json:
+ * properties:
+ * isEnabled:
+ * type: boolean
+ * description: is notification enabled
+ * responses:
+ * 200:
+ * description: Succeeded to delete global notification pattern
+ * deletedNotificaton:
+ * type: object
+ */
router.put('/global-notification/:id/enabled', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
const { id } = req.params;
const { isEnabled } = req.body;