mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
chore: Cleanup
This commit is contained in:
parent
99f0fe3f2e
commit
7273b33768
6 changed files with 0 additions and 95 deletions
|
@ -1,5 +1,4 @@
|
|||
const moment = require('moment');
|
||||
const services = require('../../services/slack');
|
||||
|
||||
const Errors = {
|
||||
NOT_ENOUGH_RIGHTS: {
|
||||
|
@ -110,12 +109,6 @@ module.exports = {
|
|||
})
|
||||
.intercept('positionMustBeInValues', () => Errors.POSITION_MUST_BE_PRESENT);
|
||||
|
||||
const cardUrl = services.buildCardUrl(card);
|
||||
const messageText = cardUrl + ' was created by ' + currentUser.name + ' in *' + list.name + '*';
|
||||
services.sendSlackMessage(messageText)
|
||||
.then(() => { console.log('Slack message sent successfully.'); })
|
||||
.catch((error) => { console.error('Failed to send Slack message:', error.message); });
|
||||
|
||||
return {
|
||||
item: card,
|
||||
};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
const services = require('../../services/slack');
|
||||
|
||||
const Errors = {
|
||||
NOT_ENOUGH_RIGHTS: {
|
||||
notEnoughRights: 'Not enough rights',
|
||||
|
@ -57,11 +55,6 @@ module.exports = {
|
|||
throw Errors.CARD_NOT_FOUND;
|
||||
}
|
||||
|
||||
const messageText = '*' + card.name + '* was deleted by ' + currentUser.name;
|
||||
services.sendSlackMessage(messageText)
|
||||
.then(() => { console.log('Slack message sent successfully.'); })
|
||||
.catch((error) => { console.error('Failed to send Slack message:', error.message); });
|
||||
|
||||
return {
|
||||
item: card,
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const moment = require('moment');
|
||||
const services = require('../../services/slack');
|
||||
|
||||
const Errors = {
|
||||
NOT_ENOUGH_RIGHTS: {
|
||||
|
@ -176,8 +175,6 @@ module.exports = {
|
|||
'isSubscribed',
|
||||
]);
|
||||
|
||||
const cardPositionBefore = card.position;
|
||||
|
||||
card = await sails.helpers.cards.updateOne
|
||||
.with({
|
||||
board,
|
||||
|
@ -198,17 +195,6 @@ module.exports = {
|
|||
throw Errors.CARD_NOT_FOUND;
|
||||
}
|
||||
|
||||
const cardPositionAfter = card.position;
|
||||
const cardMoved = cardPositionBefore !== cardPositionAfter;
|
||||
|
||||
if (cardMoved) {
|
||||
const cardUrl = services.buildCardUrl(card);
|
||||
const messageText = cardUrl + ' was moved by ' + currentUser.name + ' to *' + nextList.name + '*';
|
||||
services.sendSlackMessage(messageText)
|
||||
.then(() => { console.log('Slack message sent successfully.'); })
|
||||
.catch((error) => { console.error('Failed to send Slack message:', error.message); });
|
||||
}
|
||||
|
||||
return {
|
||||
item: card,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue