renaming attributes to labels, fixes #79

This commit is contained in:
azivner
2018-03-24 22:02:26 -04:00
parent 4c472ce78b
commit 95bb2cf0bb
40 changed files with 334 additions and 312 deletions

View File

@@ -4,7 +4,7 @@ const express = require('express');
const router = express.Router();
const sql = require('../../services/sql');
const auth = require('../../services/auth');
const attributes = require('../../services/attributes');
const labels = require('../../services/labels');
const notes = require('../../services/notes');
const wrap = require('express-promise-wrap').wrap;
const tar = require('tar-stream');
@@ -126,8 +126,8 @@ async function importNotes(files, parentNoteId, sourceId) {
sourceId: sourceId
});
for (const attr of file.meta.attributes) {
await attributes.createAttribute(noteId, attr.name, attr.value);
for (const attr of file.meta.labels) {
await labels.createLabel(noteId, attr.name, attr.value);
}
if (file.children.length > 0) {