mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Change the radom to random typo in export.js
This commit is contained in:
parent
32f50e1658
commit
e195c731de
2 changed files with 6 additions and 4 deletions
|
|
@ -1696,10 +1696,12 @@ if (Meteor.isServer) {
|
||||||
const activityType = `a-${action}`;
|
const activityType = `a-${action}`;
|
||||||
const card = Cards.findOne(doc._id);
|
const card = Cards.findOne(doc._id);
|
||||||
const list = card.list();
|
const list = card.list();
|
||||||
if (list && action === 'endAt') {
|
if (list) {
|
||||||
// change list modifiedAt
|
// change list modifiedAt, when user modified the key values in timingaction array, if it's endAt, put the modifiedAt of list back to one year ago for sorting purpose
|
||||||
const modifiedAt = new Date(
|
const modifiedAt = new Date(
|
||||||
new Date(value).getTime() - 365 * 24 * 3600 * 1e3,
|
new Date(value).getTime() - (action === 'endAt')
|
||||||
|
? 365 * 24 * 3600 * 1e3
|
||||||
|
: 0,
|
||||||
); // set it as 1 year before
|
); // set it as 1 year before
|
||||||
const boardId = list.boardId;
|
const boardId = list.boardId;
|
||||||
Lists.direct.update(
|
Lists.direct.update(
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ export class Exporter {
|
||||||
// callback has the form function (err, res) {}
|
// callback has the form function (err, res) {}
|
||||||
const tmpFile = path.join(
|
const tmpFile = path.join(
|
||||||
os.tmpdir(),
|
os.tmpdir(),
|
||||||
`tmpexport${process.pid}${Math.radom()}`,
|
`tmpexport${process.pid}${Math.random()}`,
|
||||||
);
|
);
|
||||||
const tmpWriteable = fs.createWriteStream(tmpFile);
|
const tmpWriteable = fs.createWriteStream(tmpFile);
|
||||||
const readStream = doc.createReadStream();
|
const readStream = doc.createReadStream();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue