mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 03:42:27 +03:00
Fixed date format for link bulk edit
refs https://github.com/TryGhost/Team/issues/2104 - updates date format for `updated_at` to use the right DB date format
This commit is contained in:
parent
b552727b69
commit
86a9695ccb
@ -6,6 +6,7 @@ const errors = require('@tryghost/errors');
|
||||
const nql = require('@tryghost/nql');
|
||||
const _ = require('lodash');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const moment = require('moment');
|
||||
|
||||
/**
|
||||
* @typedef {object} ILinkClickRepository
|
||||
@ -171,7 +172,7 @@ class LinkClickTrackingService {
|
||||
const bulkUpdateOptions = _.pick(options, ['transacting']);
|
||||
const updateData = {
|
||||
to: this.#urlUtils.absoluteToTransformReady(newRedirectUrl.href),
|
||||
updated_at: new Date()
|
||||
updated_at: moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
};
|
||||
|
||||
return await this.#postLinkRepository.updateLinks(linkIds, updateData, bulkUpdateOptions);
|
||||
|
@ -29,6 +29,7 @@
|
||||
"@tryghost/errors": "1.2.18",
|
||||
"@tryghost/tpl": "0.1.18",
|
||||
"@tryghost/nql": "0.9.2",
|
||||
"lodash": "4.17.21"
|
||||
"lodash": "4.17.21",
|
||||
"moment": "2.29.4"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user