1
0
Fork 0
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:
Maksim Eltyshev 2025-05-22 23:14:46 +02:00
parent 777ff467f3
commit 86cfd155f2
72 changed files with 833 additions and 169 deletions

View file

@ -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_,