mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
fix: Allow to use endpoints via http
This commit is contained in:
parent
c1ef9541ba
commit
d5076cf722
2 changed files with 6 additions and 12 deletions
|
@ -20,11 +20,6 @@ module.exports = {
|
|||
},
|
||||
|
||||
async fn(inputs) {
|
||||
// TODO: allow over HTTP without subscription
|
||||
if (!this.req.isSocket) {
|
||||
return this.res.badRequest();
|
||||
}
|
||||
|
||||
const { currentUser } = this.req;
|
||||
|
||||
const { board, project } = await sails.helpers.boards
|
||||
|
@ -77,7 +72,9 @@ module.exports = {
|
|||
card.isSubscribed = isSubscribedByCardId[card.id] || false; // eslint-disable-line no-param-reassign
|
||||
});
|
||||
|
||||
sails.sockets.join(this.req, `board:${board.id}`); // TODO: only when subscription needed
|
||||
if (this.req.isSocket) {
|
||||
sails.sockets.join(this.req, `board:${board.id}`); // TODO: only when subscription needed
|
||||
}
|
||||
|
||||
return {
|
||||
item: board,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue