mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
feat: Add board activity log
This commit is contained in:
parent
777ff467f3
commit
86cfd155f2
72 changed files with 833 additions and 169 deletions
|
@ -11,6 +11,20 @@ const create = (arrayOfValues) => Action.createEach(arrayOfValues).fetch();
|
|||
|
||||
const createOne = (values) => Action.create({ ...values }).fetch();
|
||||
|
||||
const getByBoardId = (boardId, { beforeId } = {}) => {
|
||||
const criteria = {
|
||||
boardId,
|
||||
};
|
||||
|
||||
if (beforeId) {
|
||||
criteria.id = {
|
||||
'<': beforeId,
|
||||
};
|
||||
}
|
||||
|
||||
return Action.find(criteria).sort('id DESC').limit(LIMIT);
|
||||
};
|
||||
|
||||
const getByCardId = (cardId, { beforeId } = {}) => {
|
||||
const criteria = {
|
||||
cardId,
|
||||
|
@ -33,6 +47,7 @@ const delete_ = (criteria) => Action.destroy(criteria).fetch();
|
|||
module.exports = {
|
||||
create,
|
||||
createOne,
|
||||
getByBoardId,
|
||||
getByCardId,
|
||||
update,
|
||||
delete: delete_,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue