summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 879dde84..a0c0c8bf 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -556,6 +556,18 @@ if (Meteor.isServer) {
//BOARDS REST API
if (Meteor.isServer) {
+ JsonRoutes.add('GET', '/api/user/boards', function (req, res, next) {
+ // TODO: This should be changed to be less restrictive!
+ Authentication.checkUserId(req.userId);
+
+ return Boards.find({
+ archived: false,
+ 'members.userId': req.userId, // TODO: How does the current authentication system work? Can we rely on req.userId to be correct?
+ }, {
+ sort: ['title'],
+ });
+ });
+
JsonRoutes.add('GET', '/api/boards', function (req, res, next) {
Authentication.checkUserId(req.userId);
JsonRoutes.sendResult(res, {