mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
12 lines
388 B
JavaScript
12 lines
388 B
JavaScript
'use strict';
|
|
const { withoutCommentPrivateFields } = require('./commentPrivateFields');
|
|
|
|
function buildCopiedComment(comment, newCardId, newBoardId) {
|
|
if (!comment || !newCardId || !newBoardId) return null;
|
|
const copy = { ...withoutCommentPrivateFields(comment), cardId: newCardId, boardId: newBoardId };
|
|
delete copy._id;
|
|
return copy;
|
|
}
|
|
|
|
module.exports = { buildCopiedComment };
|