summaryrefslogtreecommitdiffstats
path: root/lib/api/decodeConfig.js
blob: 886ba455d30e6591418e43ccb25fb69cf5c9113f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var Config = require('../models/config');

/**
    Decode changes from a JS API to a config object

    @param {Config} config
    @param {Object} result: result from API
    @return {Config}
*/
function decodeGlobal(config, result) {
    var values = result.values;
    return Config.updateValues(config, values);
}

module.exports = decodeGlobal;