mirror of
https://github.com/plankanban/planka.git
synced 2025-07-24 07:39:44 +02:00
parent
4124ab17d2
commit
3779bdb053
38 changed files with 416 additions and 9 deletions
|
@ -44,7 +44,7 @@ module.exports = {
|
|||
async fn(inputs, exits) {
|
||||
const { currentUser } = this.req;
|
||||
|
||||
const { card } = await sails.helpers.cards
|
||||
const { card, board } = await sails.helpers.cards
|
||||
.getProjectPath(inputs.cardId)
|
||||
.intercept('pathNotFound', () => Errors.CARD_NOT_FOUND);
|
||||
|
||||
|
@ -88,6 +88,7 @@ module.exports = {
|
|||
card,
|
||||
creatorUser: currentUser,
|
||||
},
|
||||
board,
|
||||
requestId: inputs.requestId,
|
||||
request: this.req,
|
||||
});
|
||||
|
|
|
@ -45,7 +45,7 @@ module.exports = {
|
|||
async fn(inputs) {
|
||||
const { currentUser } = this.req;
|
||||
|
||||
const { card } = await sails.helpers.cards
|
||||
const { card, board } = await sails.helpers.cards
|
||||
.getProjectPath(inputs.cardId)
|
||||
.intercept('pathNotFound', () => Errors.CARD_NOT_FOUND);
|
||||
|
||||
|
@ -74,6 +74,7 @@ module.exports = {
|
|||
card,
|
||||
userId: inputs.userId,
|
||||
},
|
||||
board,
|
||||
request: this.req,
|
||||
})
|
||||
.intercept('userAlreadyCardMember', () => Errors.USER_ALREADY_CARD_MEMBER);
|
||||
|
|
|
@ -39,7 +39,7 @@ module.exports = {
|
|||
async fn(inputs) {
|
||||
const { currentUser } = this.req;
|
||||
|
||||
const { board } = await sails.helpers.cards
|
||||
const { board, card } = await sails.helpers.cards
|
||||
.getProjectPath(inputs.cardId)
|
||||
.intercept('pathNotFound', () => Errors.CARD_NOT_FOUND);
|
||||
|
||||
|
@ -67,6 +67,7 @@ module.exports = {
|
|||
|
||||
cardMembership = await sails.helpers.cardMemberships.deleteOne.with({
|
||||
board,
|
||||
card,
|
||||
record: cardMembership,
|
||||
request: this.req,
|
||||
});
|
||||
|
|
|
@ -36,7 +36,7 @@ module.exports = {
|
|||
.intercept('pathNotFound', () => Errors.COMMENT_ACTION_NOT_FOUND);
|
||||
|
||||
let { action } = path;
|
||||
const { board, project } = path;
|
||||
const { board, project, card } = path;
|
||||
|
||||
const isProjectManager = await sails.helpers.users.isProjectManager(currentUser.id, project.id);
|
||||
|
||||
|
@ -61,6 +61,7 @@ module.exports = {
|
|||
|
||||
action = await sails.helpers.actions.deleteOne.with({
|
||||
board,
|
||||
card,
|
||||
record: action,
|
||||
request: this.req,
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ module.exports = {
|
|||
.intercept('pathNotFound', () => Errors.COMMENT_ACTION_NOT_FOUND);
|
||||
|
||||
let { action } = path;
|
||||
const { board, project } = path;
|
||||
const { board, project, card } = path;
|
||||
|
||||
const isProjectManager = await sails.helpers.users.isProjectManager(currentUser.id, project.id);
|
||||
|
||||
|
@ -69,6 +69,7 @@ module.exports = {
|
|||
|
||||
action = await sails.helpers.actions.updateOne.with({
|
||||
values,
|
||||
card,
|
||||
board,
|
||||
record: action,
|
||||
request: this.req,
|
||||
|
|
|
@ -28,7 +28,8 @@ module.exports = {
|
|||
async fn(inputs) {
|
||||
const { currentUser } = this.req;
|
||||
|
||||
let { list } = await sails.helpers.lists
|
||||
// eslint-disable-next-line prefer-const
|
||||
let { list, board } = await sails.helpers.lists
|
||||
.getProjectPath(inputs.id)
|
||||
.intercept('pathNotFound', () => Errors.LIST_NOT_FOUND);
|
||||
|
||||
|
@ -47,6 +48,7 @@ module.exports = {
|
|||
|
||||
list = await sails.helpers.lists.deleteOne.with({
|
||||
record: list,
|
||||
board,
|
||||
request: this.req,
|
||||
});
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ module.exports = {
|
|||
async fn(inputs) {
|
||||
const { currentUser } = this.req;
|
||||
|
||||
let { list } = await sails.helpers.lists
|
||||
// eslint-disable-next-line prefer-const
|
||||
let { list, board } = await sails.helpers.lists
|
||||
.getProjectPath(inputs.id)
|
||||
.intercept('pathNotFound', () => Errors.LIST_NOT_FOUND);
|
||||
|
||||
|
@ -56,6 +57,7 @@ module.exports = {
|
|||
|
||||
list = await sails.helpers.lists.updateOne.with({
|
||||
values,
|
||||
board,
|
||||
record: list,
|
||||
request: this.req,
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ module.exports = {
|
|||
async fn(inputs) {
|
||||
const { currentUser } = this.req;
|
||||
|
||||
const { card } = await sails.helpers.cards
|
||||
const { card, board } = await sails.helpers.cards
|
||||
.getProjectPath(inputs.cardId)
|
||||
.intercept('pathNotFound', () => Errors.CARD_NOT_FOUND);
|
||||
|
||||
|
@ -63,6 +63,7 @@ module.exports = {
|
|||
...values,
|
||||
card,
|
||||
},
|
||||
board,
|
||||
request: this.req,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue