Skip to content

Commit 386ee47

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents c236eb0 + a05948d commit 386ee47

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ Pre-requisites: `Node 18^` & `pm2` installed.
105105
- Name the integration (e.g., Newsletters) and click **Add**.
106106
- **Copy** the **Admin API Key** displayed.
107107
3. **Configure Ghosler**:
108-
- Fire up the Ghosler front-end by going to `https://your-domain.com`. Default `PORT` is `2369`.
108+
- Fire up the Ghosler front-end by going to `https://your-domain.com`.
109+
- Default `PORT` is `2369`
110+
- Default login credentials are - Username: `ghosler`, Password - `admin`
109111
- Click on **Settings** button.
110112
- Click on **Ghost Settings** & add your **Ghost Site Url** & **Admin API Key**.
111113
- Add mail configurations in **Emails** section.
@@ -161,4 +163,4 @@ If you want to customize the newsletter template even more, follow the steps -
161163
2. <s>Add feedback support in newsletter template</s>.
162164
3. <s>Build a `CLI` to install, update & other options to manage Ghosler instance</s>.
163165

164-
#### And don't forget to `` the project!
166+
#### And don't forget to `` the project!

utils/data/configs.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ export default class ProjectConfigs {
147147
configs.ghosler.auth.pass = Miscellaneous.hash(newPass);
148148

149149
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.'};
152155
}
153156

154157
const url = formData['ghosler.url'];
@@ -216,10 +219,12 @@ export default class ProjectConfigs {
216219
};
217220
})];
218221

219-
this.#cachedSettings = configs;
220222
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.'};
223228
}
224229

225230
/**

0 commit comments

Comments
 (0)