basic entities for attributes (unification of labels and relations)

This commit is contained in:
azivner
2018-08-02 22:48:21 +02:00
parent 040f9185f8
commit 097114c0f2
10 changed files with 253 additions and 25 deletions

View File

@@ -25,6 +25,7 @@ const sqlRoute = require('./api/sql');
const anonymizationRoute = require('./api/anonymization');
const cleanupRoute = require('./api/cleanup');
const imageRoute = require('./api/image');
const attributesRoute = require('./api/attributes');
const labelsRoute = require('./api/labels');
const relationsRoute = require('./api/relations');
const scriptRoute = require('./api/script');
@@ -133,6 +134,11 @@ function register(app) {
route(GET, '/api/notes/:noteId/download', [auth.checkApiAuthOrElectron], filesRoute.downloadFile);
apiRoute(GET, '/api/notes/:noteId/attributes', attributesRoute.getNoteAttributes);
apiRoute(PUT, '/api/notes/:noteId/attributes', attributesRoute.updateNoteAttributes);
apiRoute(GET, '/api/attributes/names', attributesRoute.getAllAttributeNames);
apiRoute(GET, '/api/attributes/values/:attributeName', attributesRoute.getValuesForAttribute);
apiRoute(GET, '/api/notes/:noteId/labels', labelsRoute.getNoteLabels);
apiRoute(PUT, '/api/notes/:noteId/labels', labelsRoute.updateNoteLabels);
apiRoute(GET, '/api/labels/names', labelsRoute.getAllLabelNames);