mirror of
https://github.com/plankanban/planka.git
synced 2025-07-20 13:49:43 +02:00
Code formatting with prettier, change eslint config for the server
This commit is contained in:
parent
b7f37f0f96
commit
a11f6260c0
191 changed files with 4321 additions and 2880 deletions
|
@ -2,41 +2,41 @@ module.exports = {
|
|||
inputs: {
|
||||
ids: {
|
||||
type: 'json',
|
||||
custom: value => _.isArray(value),
|
||||
required: true
|
||||
custom: (value) => _.isArray(value),
|
||||
required: true,
|
||||
},
|
||||
user: {
|
||||
type: 'ref',
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
values: {
|
||||
type: 'json',
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
request: {
|
||||
type: 'ref'
|
||||
}
|
||||
type: 'ref',
|
||||
},
|
||||
},
|
||||
|
||||
fn: async function(inputs, exits) {
|
||||
async fn(inputs, exits) {
|
||||
const notifications = await Notification.update({
|
||||
id: inputs.ids,
|
||||
userId: inputs.user.id
|
||||
userId: inputs.user.id,
|
||||
})
|
||||
.set(inputs.values)
|
||||
.fetch();
|
||||
|
||||
notifications.forEach(notification => {
|
||||
notifications.forEach((notification) => {
|
||||
sails.sockets.broadcast(
|
||||
`user:${notification.userId}`,
|
||||
'notificationUpdate',
|
||||
{
|
||||
item: notification
|
||||
item: notification,
|
||||
},
|
||||
inputs.request
|
||||
inputs.request,
|
||||
);
|
||||
});
|
||||
|
||||
return exits.success(notifications);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue