summaryrefslogtreecommitdiffstats
path: root/models/export.js
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2018-10-26 07:27:24 +0200
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2019-01-18 17:02:56 +0100
commitff467402c0c24981078f1f8e2b92b26b0d67d00a (patch)
tree289b4647e571f7896172028068b2bd130cbfa757 /models/export.js
parent49d3eb5a3f21fad1eb2952eb3da2f93c5c5d6272 (diff)
downloadwekan-ff467402c0c24981078f1f8e2b92b26b0d67d00a.tar.gz
wekan-ff467402c0c24981078f1f8e2b92b26b0d67d00a.tar.bz2
wekan-ff467402c0c24981078f1f8e2b92b26b0d67d00a.zip
RESTAPI: Add some JSDoc
So we can have a decent REST API documentation generated.
Diffstat (limited to 'models/export.js')
-rw-r--r--models/export.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/models/export.js b/models/export.js
index 62d2687a..fa4894d9 100644
--- a/models/export.js
+++ b/models/export.js
@@ -6,13 +6,20 @@ if (Meteor.isServer) {
// `ApiRoutes.path('boards/export', boardId)``
// on the client instead of copy/pasting the route path manually between the
// client and the server.
- /*
- * This route is used to export the board FROM THE APPLICATION.
- * If user is already logged-in, pass loginToken as param "authToken":
- * '/api/boards/:boardId/export?authToken=:token'
+ /**
+ * @operation export
+ * @tag Boards
+ *
+ * @summary This route is used to export the board **FROM THE APPLICATION**.
+ *
+ * @description If user is already logged-in, pass loginToken as param
+ * "authToken": '/api/boards/:boardId/export?authToken=:token'
*
* See https://blog.kayla.com.au/server-side-route-authentication-in-meteor/
* for detailed explanations
+ *
+ * @param {string} boardId the ID of the board we are exporting
+ * @param {string} authToken the loginToken
*/
JsonRoutes.add('get', '/api/boards/:boardId/export', function(req, res) {
const boardId = req.params.boardId;