mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
Add username to user
This commit is contained in:
parent
ec222a5e32
commit
af00e3e191
143 changed files with 1051 additions and 420 deletions
|
@ -6,7 +6,7 @@ module.exports = {
|
|||
},
|
||||
userOrUserId: {
|
||||
type: 'ref',
|
||||
custom: value => _.isPlainObject(value) || _.isString(value),
|
||||
custom: (value) => _.isPlainObject(value) || _.isString(value),
|
||||
required: true,
|
||||
},
|
||||
request: {
|
||||
|
@ -14,6 +14,10 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
|
||||
exits: {
|
||||
userAlreadyCardMember: {},
|
||||
},
|
||||
|
||||
async fn(inputs, exits) {
|
||||
const { userId = inputs.userOrUserId } = inputs.userOrUserId;
|
||||
|
||||
|
@ -21,7 +25,7 @@ module.exports = {
|
|||
userId,
|
||||
cardId: inputs.card.id,
|
||||
})
|
||||
.intercept('E_UNIQUE', 'conflict')
|
||||
.intercept('E_UNIQUE', 'userAlreadyCardMember')
|
||||
.fetch();
|
||||
|
||||
sails.sockets.broadcast(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue