@@ -147,8 +147,11 @@ export default class ProjectConfigs {
147
147
configs . ghosler . auth . pass = Miscellaneous . hash ( newPass ) ;
148
148
149
149
const success = await this . #write( configs ) ;
150
- if ( success ) return { level : 'success' , message : 'Password updated!' } ;
151
- else return { level : 'error' , message : 'Error updating password, check error logs for more info.' } ;
150
+ if ( success ) {
151
+ // update password in cache.
152
+ this . #cachedSettings = configs ;
153
+ return { level : 'success' , message : 'Password updated!' } ;
154
+ } else return { level : 'error' , message : 'Error updating password, check error logs for more info.' } ;
152
155
}
153
156
154
157
const url = formData [ 'ghosler.url' ] ;
@@ -216,10 +219,12 @@ export default class ProjectConfigs {
216
219
} ;
217
220
} ) ] ;
218
221
219
- this . #cachedSettings = configs ;
220
222
const success = await this . #write( configs ) ;
221
- if ( success ) return { level : 'success' , message : 'Settings updated!' } ;
222
- else return { level : 'error' , message : 'Error updating settings, check error logs for more info.' } ;
223
+ if ( success ) {
224
+ // update the config. cache.
225
+ this . #cachedSettings = configs ;
226
+ return { level : 'success' , message : 'Settings updated!' } ;
227
+ } else return { level : 'error' , message : 'Error updating settings, check error logs for more info.' } ;
223
228
}
224
229
225
230
/**
0 commit comments