Ver código fonte

fix: cfg funcs

Sven 1 ano atrás
pai
commit
e7ac18fbff
1 arquivos alterados com 5 adições e 7 exclusões
  1. 5 7
      src/config.ts

+ 5 - 7
src/config.ts

@@ -31,15 +31,13 @@ export function getFeatures() {
 }
 
 /** Saves the feature config synchronously to the in-memory cache and asynchronously to the persistent storage */
-export function saveFeatures(featureConf: FeatureConfig) {
-  const newData = cfgMgr.setData(featureConf);
-  info("Saved new feature config:", newData);
-  return newData;
+export async function saveFeatures(featureConf: FeatureConfig) {
+  await cfgMgr.setData(featureConf);
+  info("Saved new feature config:", featureConf);
 }
 
 /** Saves the default feature config synchronously to the in-memory cache and asynchronously to persistent storage */
-export function setDefaultFeatures() {
-  const defaultData = cfgMgr.saveDefaultData();
+export async function setDefaultFeatures() {
+  await cfgMgr.saveDefaultData();
   info("Reset feature config to its default value");
-  return defaultData;
 }