|
|
|
@ -2,7 +2,6 @@
|
|
|
|
|
const Data = module.exports;
|
|
|
|
|
|
|
|
|
|
const Meta = require("../metadata");
|
|
|
|
|
const WriteQueue = require("../write-queue");
|
|
|
|
|
const Core = require("./core");
|
|
|
|
|
const Util = require("../common-util");
|
|
|
|
|
const HK = require("../hk-util");
|
|
|
|
@ -53,7 +52,6 @@ Data.getMetadata = function (Env, channel, cb, Server, netfluxId) {
|
|
|
|
|
value: value
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
var queueMetadata = WriteQueue();
|
|
|
|
|
Data.setMetadata = function (Env, safeKey, data, cb, Server) {
|
|
|
|
|
var unsafeKey = Util.unescapeKeyCharacters(safeKey);
|
|
|
|
|
|
|
|
|
@ -63,7 +61,7 @@ Data.setMetadata = function (Env, safeKey, data, cb, Server) {
|
|
|
|
|
if (!command || typeof (command) !== 'string') { return void cb('INVALID_COMMAND'); }
|
|
|
|
|
if (Meta.commands.indexOf(command) === -1) { return void cb('UNSUPPORTED_COMMAND'); }
|
|
|
|
|
|
|
|
|
|
queueMetadata(channel, function (next) {
|
|
|
|
|
Env.queueMetadata(channel, function (next) {
|
|
|
|
|
Data.getMetadataRaw(Env, channel, function (err, metadata) {
|
|
|
|
|
if (err) {
|
|
|
|
|
cb(err);
|
|
|
|
|