mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added note column to csv import/export for members
no-issue
This commit is contained in:
parent
fe59613867
commit
f3a8119870
2 changed files with 4 additions and 3 deletions
|
@ -153,7 +153,7 @@ const members = {
|
|||
|
||||
return fsLib.readCSV({
|
||||
path: filePath,
|
||||
columnsToExtract: [{name: 'email', lookup: /email/i}, {name: 'name', lookup: /name/i}]
|
||||
columnsToExtract: [{name: 'email', lookup: /email/i}, {name: 'name', lookup: /name/i}, {name: 'note', lookup: /note/i}]
|
||||
}).then((result) => {
|
||||
return Promise.all(result.map((entry) => {
|
||||
const api = require('./index');
|
||||
|
@ -162,7 +162,8 @@ const members = {
|
|||
data: {
|
||||
members: [{
|
||||
email: entry.email,
|
||||
name: entry.name
|
||||
name: entry.name,
|
||||
note: entry.note
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
|
|
|
@ -41,7 +41,7 @@ module.exports = {
|
|||
exportCSV(models, apiConfig, frame) {
|
||||
debug('exportCSV');
|
||||
|
||||
const fields = ['id', 'email', 'name', 'created_at', 'deleted_at'];
|
||||
const fields = ['id', 'email', 'name', 'note', 'created_at', 'deleted_at'];
|
||||
|
||||
function formatCSV(data) {
|
||||
let csv = `${fields.join(',')}\r\n`,
|
||||
|
|
Loading…
Add table
Reference in a new issue