mirror of
https://github.com/plankanban/planka.git
synced 2025-07-20 05:39:43 +02:00
17 lines
385 B
JavaScript
17 lines
385 B
JavaScript
|
module.exports = {
|
||
|
fn: async function(inputs, exits) {
|
||
|
// TODO: allow over HTTP without subscription
|
||
|
if (!this.req.isSocket) {
|
||
|
return this.res.badRequest();
|
||
|
}
|
||
|
|
||
|
const { currentUser } = this.req;
|
||
|
|
||
|
sails.sockets.join(this.req, `user:${currentUser.id}`); // TODO: only when subscription needed
|
||
|
|
||
|
return exits.success({
|
||
|
item: currentUser
|
||
|
});
|
||
|
}
|
||
|
};
|