mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 06:33:28 +00:00
Tweaks to config options handling after review
This commit is contained in:
parent
36eb0a108e
commit
70be2ae596
@ -15,7 +15,6 @@ limitations under the License.
|
||||
*/
|
||||
import Promise = require('bluebird');
|
||||
import ResinSdk = require('resin-sdk');
|
||||
import _ = require('lodash');
|
||||
import deviceConfig = require('resin-device-config');
|
||||
import * as semver from 'resin-semver';
|
||||
|
||||
@ -25,13 +24,12 @@ export function generateBaseConfig(
|
||||
application: ResinSdk.Application,
|
||||
options: { version?: string; appUpdatePollInterval?: number },
|
||||
) {
|
||||
options = _.mapValues(options, function(value, key) {
|
||||
if (key === 'appUpdatePollInterval') {
|
||||
return options[key]! * 60 * 1000;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
});
|
||||
if (options.appUpdatePollInterval) {
|
||||
options = {
|
||||
...options,
|
||||
appUpdatePollInterval: options.appUpdatePollInterval * 60 * 1000,
|
||||
};
|
||||
}
|
||||
|
||||
return Promise.props({
|
||||
userId: resin.auth.getUserId(),
|
||||
|
Loading…
Reference in New Issue
Block a user