mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 05:27:14 -04:00
Merge branch 'devel'
This commit is contained in:
commit
e44c46bcd2
15 changed files with 88 additions and 65 deletions
|
@ -129,6 +129,8 @@
|
|||
"Integrations": true,
|
||||
"HTTP": true,
|
||||
"AccountSettings": true,
|
||||
"Announcements": true
|
||||
"Announcements": true,
|
||||
"Swimlanes": true,
|
||||
"Npm": true
|
||||
}
|
||||
}
|
||||
|
|
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -1,3 +1,14 @@
|
|||
# Upcoming Wekan release
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
- [Fix lint errors related to sandstorm](https://github.com/wekan/wekan/commit/0a16147470246c8f49bb918f5ddc7bb2e54fba14);
|
||||
- [Add Swimlanes to globals](https://github.com/wekan/wekan/commit/373e9782dcf87a9c1169b5d1f8175ce14e4898c9);
|
||||
- [Fix lint errors related to trello creator](https://github.com/wekan/wekan/commit/951a0db380d60f3d948ae38d50b85a54983a51de);
|
||||
- [Fix lint errors related to language names](https://github.com/wekan/wekan/commit/c0d33d97f2c8d4e9371a03d4ad3022df3ed64d3d).
|
||||
|
||||
Thanks to GitHub user GhassenRjab for contributions.
|
||||
|
||||
# v0.77 2018-02-23 Wekan release
|
||||
|
||||
This release adds the following new features:
|
||||
|
|
|
@ -17,10 +17,14 @@ Template.userFormsLayout.onRendered(() => {
|
|||
Template.userFormsLayout.helpers({
|
||||
languages() {
|
||||
return _.map(TAPi18n.getLanguages(), (lang, code) => {
|
||||
return {
|
||||
tag: code,
|
||||
name: lang.name === 'br' ? 'Brezhoneg' : lang.name === 'ig' ? 'Igbo' : lang.name,
|
||||
};
|
||||
const tag = code;
|
||||
let name = lang.name;
|
||||
if (lang.name === 'br') {
|
||||
name = 'Brezhoneg';
|
||||
} else if (lang.name === 'ig') {
|
||||
name = 'Igbo';
|
||||
}
|
||||
return { tag, name };
|
||||
}).sort(function(a, b) {
|
||||
if (a.name === b.name) {
|
||||
return 0;
|
||||
|
|
|
@ -156,7 +156,7 @@ Template.memberPopup.events({
|
|||
}),
|
||||
'click .js-leave-member': Popup.afterConfirm('leaveBoard', () => {
|
||||
const boardId = Session.get('currentBoard');
|
||||
Meteor.call('quitBoard', boardId, (err, ret) => {
|
||||
Meteor.call('quitBoard', boardId, () => {
|
||||
Popup.close();
|
||||
FlowRouter.go('home');
|
||||
});
|
||||
|
|
|
@ -114,10 +114,16 @@ Template.changePasswordPopup.onRendered(function () {
|
|||
Template.changeLanguagePopup.helpers({
|
||||
languages() {
|
||||
return _.map(TAPi18n.getLanguages(), (lang, code) => {
|
||||
return {
|
||||
tag: code,
|
||||
name: lang.name === 'br' ? 'Brezhoneg' : lang.name === 'ig' ? 'Igbo' : lang.name,
|
||||
};
|
||||
// Same code in /client/components/main/layouts.js
|
||||
// TODO : Make code reusable
|
||||
const tag = code;
|
||||
let name = lang.name;
|
||||
if (lang.name === 'br') {
|
||||
name = 'Brezhoneg';
|
||||
} else if (lang.name === 'ig') {
|
||||
name = 'Igbo';
|
||||
}
|
||||
return { tag, name };
|
||||
}).sort(function (a, b) {
|
||||
if (a.name === b.name) {
|
||||
return 0;
|
||||
|
|
|
@ -608,7 +608,7 @@ if (Meteor.isServer) {
|
|||
|
||||
//BOARDS REST API
|
||||
if (Meteor.isServer) {
|
||||
JsonRoutes.add('GET', '/api/users/:userId/boards', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/users/:userId/boards', function (req, res) {
|
||||
try {
|
||||
Authentication.checkLoggedIn(req.userId);
|
||||
const paramUserId = req.params.userId;
|
||||
|
@ -638,7 +638,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/boards', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
JsonRoutes.sendResult(res, {
|
||||
|
@ -659,7 +659,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/boards/:id', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:id', function (req, res) {
|
||||
try {
|
||||
const id = req.params.id;
|
||||
Authentication.checkBoardAccess(req.userId, id);
|
||||
|
@ -677,7 +677,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('POST', '/api/boards', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const id = Boards.insert({
|
||||
|
@ -708,7 +708,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('DELETE', '/api/boards/:id', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:id', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const id = req.params.id;
|
||||
|
|
|
@ -87,7 +87,7 @@ if (Meteor.isServer) {
|
|||
|
||||
//CARD COMMENT REST API
|
||||
if (Meteor.isServer) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/comments', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/comments', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
@ -111,7 +111,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/comments/:commentId', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/comments/:commentId', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
@ -130,7 +130,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/cards/:cardId/comments', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/cards/:cardId/comments', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
@ -160,7 +160,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/cards/:cardId/comments/:commentId', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/cards/:cardId/comments/:commentId', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
|
|
@ -433,7 +433,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
//LISTS REST API
|
||||
if (Meteor.isServer) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId/cards', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId/cards', function (req, res) {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramListId = req.params.listId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
|
@ -449,7 +449,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res) {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramListId = req.params.listId;
|
||||
const paramCardId = req.params.cardId;
|
||||
|
@ -460,7 +460,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
});
|
||||
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/lists/:listId/cards', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/lists/:listId/cards', function (req, res) {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramListId = req.params.listId;
|
||||
|
@ -493,7 +493,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('PUT', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) {
|
||||
JsonRoutes.add('PUT', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res) {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramCardId = req.params.cardId;
|
||||
|
@ -527,7 +527,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res) {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramListId = req.params.listId;
|
||||
|
|
|
@ -258,7 +258,7 @@ if (Meteor.isServer) {
|
|||
|
||||
//CARD COMMENT REST API
|
||||
if (Meteor.isServer) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/checklists', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/checklists', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramCardId = req.params.cardId;
|
||||
|
@ -280,7 +280,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/checklists/:checklistId', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/cards/:cardId/checklists/:checklistId', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramChecklistId = req.params.checklistId;
|
||||
|
@ -298,7 +298,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/cards/:cardId/checklists', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/cards/:cardId/checklists', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramCardId = req.params.cardId;
|
||||
|
@ -329,7 +329,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/cards/:cardId/checklists/:checklistId', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/cards/:cardId/checklists/:checklistId', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramCommentId = req.params.commentId;
|
||||
|
|
|
@ -59,7 +59,7 @@ Integrations.allow({
|
|||
//INTEGRATIONS REST API
|
||||
if (Meteor.isServer) {
|
||||
// Get all integrations in board
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/integrations', function(req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/integrations', function(req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
|
@ -79,7 +79,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
// Get a single integration in board
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/integrations/:intId', function(req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/integrations/:intId', function(req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramIntId = req.params.intId;
|
||||
|
@ -99,7 +99,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
// Create a new integration
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/integrations', function(req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/integrations', function(req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
|
@ -126,7 +126,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
// Edit integration data
|
||||
JsonRoutes.add('PUT', '/api/boards/:boardId/integrations/:intId', function (req, res, next) {
|
||||
JsonRoutes.add('PUT', '/api/boards/:boardId/integrations/:intId', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramIntId = req.params.intId;
|
||||
|
@ -174,7 +174,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
// Delete subscribed activities
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/integrations/:intId/activities', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/integrations/:intId/activities', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramIntId = req.params.intId;
|
||||
|
@ -198,7 +198,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
// Add subscribed activities
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/integrations/:intId/activities', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/integrations/:intId/activities', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramIntId = req.params.intId;
|
||||
|
@ -222,7 +222,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
// Delete integration
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/integrations/:intId', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/integrations/:intId', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramIntId = req.params.intId;
|
||||
|
|
|
@ -201,7 +201,7 @@ if (Meteor.isServer) {
|
|||
|
||||
//LISTS REST API
|
||||
if (Meteor.isServer) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess( req.userId, paramBoardId);
|
||||
|
@ -224,7 +224,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramListId = req.params.listId;
|
||||
|
@ -242,7 +242,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/lists', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/lists', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
@ -265,7 +265,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
|
|
@ -131,7 +131,7 @@ if (Meteor.isServer) {
|
|||
|
||||
//SWIMLANE REST API
|
||||
if (Meteor.isServer) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/swimlanes', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/swimlanes', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess( req.userId, paramBoardId);
|
||||
|
@ -154,7 +154,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/swimlanes/:swimlaneId', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/swimlanes/:swimlaneId', function (req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
const paramSwimlaneId = req.params.swimlaneId;
|
||||
|
@ -172,7 +172,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/swimlanes', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/boards/:boardId/swimlanes', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
@ -195,7 +195,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/swimlanes/:swimlaneId', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/swimlanes/:swimlaneId', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId( req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
|
|
|
@ -401,19 +401,19 @@ export class TrelloCreator {
|
|||
}
|
||||
|
||||
createSwimlanes(boardId) {
|
||||
const swimlaneToCreate = {
|
||||
archived: false,
|
||||
boardId,
|
||||
// We are being defensing here by providing a default date (now) if the
|
||||
// creation date wasn't found on the action log. This happen on old
|
||||
// Wekan boards (eg from 2013) that didn't log the 'createList' action
|
||||
// we require.
|
||||
createdAt: this._now(),
|
||||
title: 'Default',
|
||||
};
|
||||
const swimlaneId = Swimlanes.direct.insert(swimlaneToCreate);
|
||||
Swimlanes.direct.update(swimlaneId, {$set: {'updatedAt': this._now()}});
|
||||
this.swimlane = swimlaneId;
|
||||
const swimlaneToCreate = {
|
||||
archived: false,
|
||||
boardId,
|
||||
// We are being defensing here by providing a default date (now) if the
|
||||
// creation date wasn't found on the action log. This happen on old
|
||||
// Wekan boards (eg from 2013) that didn't log the 'createList' action
|
||||
// we require.
|
||||
createdAt: this._now(),
|
||||
title: 'Default',
|
||||
};
|
||||
const swimlaneId = Swimlanes.direct.insert(swimlaneToCreate);
|
||||
Swimlanes.direct.update(swimlaneId, {$set: {'updatedAt': this._now()}});
|
||||
this.swimlane = swimlaneId;
|
||||
}
|
||||
|
||||
createChecklists(trelloChecklists) {
|
||||
|
|
|
@ -600,7 +600,7 @@ if (Meteor.isServer) {
|
|||
|
||||
// USERS REST API
|
||||
if (Meteor.isServer) {
|
||||
JsonRoutes.add('GET', '/api/user', function(req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/user', function(req, res) {
|
||||
try {
|
||||
Authentication.checkLoggedIn(req.userId);
|
||||
const data = Meteor.users.findOne({ _id: req.userId});
|
||||
|
@ -618,7 +618,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/users', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/users', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
JsonRoutes.sendResult(res, {
|
||||
|
@ -636,7 +636,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('GET', '/api/users/:id', function (req, res, next) {
|
||||
JsonRoutes.add('GET', '/api/users/:id', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const id = req.params.id;
|
||||
|
@ -653,7 +653,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('PUT', '/api/users/:id', function (req, res, next) {
|
||||
JsonRoutes.add('PUT', '/api/users/:id', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const id = req.params.id;
|
||||
|
@ -696,7 +696,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('POST', '/api/users/', function (req, res, next) {
|
||||
JsonRoutes.add('POST', '/api/users/', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const id = Accounts.createUser({
|
||||
|
@ -720,7 +720,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
|
||||
JsonRoutes.add('DELETE', '/api/users/:id', function (req, res, next) {
|
||||
JsonRoutes.add('DELETE', '/api/users/:id', function (req, res) {
|
||||
try {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const id = req.params.id;
|
||||
|
|
|
@ -22,9 +22,9 @@ const sandstormBoard = {
|
|||
|
||||
if (isSandstorm && Meteor.isServer) {
|
||||
const fs = require('fs');
|
||||
const pathParts = process.cwd().split("/");
|
||||
var path = pathParts.join("/");
|
||||
const Capnp = Npm.require(path + "../../../node_modules/capnp.js");
|
||||
const pathParts = process.cwd().split('/');
|
||||
const path = pathParts.join('/');
|
||||
const Capnp = Npm.require(`${path}../../../node_modules/capnp.js`);
|
||||
const Package = Capnp.importSystem('sandstorm/package.capnp');
|
||||
const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp');
|
||||
const Identity = Capnp.importSystem('sandstorm/identity.capnp');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue