feat: enhance API documentation and add board-related endpoints

Previously, boards.js contains a `?.` operator, which is not supported by esprima, therefore boards.js is skipped.

This PR fixes the API generation for borads.js by removing `?.`.

See https://github.com/jquery/esprima/issues/2112
This commit is contained in:
Yang, Bo 2025-06-23 19:37:41 +00:00
parent 12d3fabdb7
commit f399b5119f
3 changed files with 855 additions and 5 deletions

View file

@ -1760,7 +1760,7 @@ if (Meteor.isServer) {
).sort();
},
setAllBoardsHideActivities() {
if (ReactiveCache.getCurrentUser()?.isAdmin) {
if ((ReactiveCache.getCurrentUser() || {}).isAdmin) {
Boards.update(
{
showActivities: true
@ -2001,8 +2001,8 @@ if (Meteor.isServer) {
*
* @param {string} userId the ID of the user to retrieve the data
* @return_type [{_id: string,
title: string}]
*/
* title: string}]
*/
JsonRoutes.add('GET', '/api/users/:userId/boards', function(req, res) {
try {
Authentication.checkLoggedIn(req.userId);
@ -2236,7 +2236,7 @@ if (Meteor.isServer) {
});
}
});
/**
* @operation add_board_label
* @summary Add a label to a board