From 115ea533f621dcc51543f131f05ea9276e9aabc5 Mon Sep 17 00:00:00 2001 From: Xavier Priour Date: Thu, 17 Dec 2015 23:57:28 +0100 Subject: Export: improved API routes - use an explicit "boards" domain: /api/boards/:boardId - pass authToken as a request parameter: /api/boards/:boardId?authToken=:token - in the future, same route can be used with authToken set in the Authenticate: header easily --- client/components/boards/boardHeader.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'client/components') diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index 0c9b5794..2bf68a41 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -18,9 +18,8 @@ Template.boardMenuPopup.events({ Template.boardMenuPopup.helpers({ exportUrl() { const boardId = Session.get('currentBoard'); - const userId = Meteor.userId(); const loginToken = Accounts._storedLoginToken(); - return Meteor.absoluteUrl(`api/b/${boardId}/${userId}/${loginToken}`); + return Meteor.absoluteUrl(`api/boards/${boardId}?authToken=${loginToken}`); }, exportFilename() { const boardId = Session.get('currentBoard'); -- cgit v1.2.3-1-g7c22