♻️ Refactor

This commit is contained in:
Liyas Thomas
2020-01-31 18:25:55 +05:30
parent 1d6d8af748
commit c32c6e0363
2 changed files with 5 additions and 3 deletions

View File

@@ -74,7 +74,9 @@ export default {
methods: {
defineTheme() {
if (this.theme) return this.theme;
if (this.theme) {
return this.theme;
}
return (
this.$store.state.postwoman.settings.THEME_ACE_EDITOR || DEFAULT_THEME
);

View File

@@ -1884,10 +1884,10 @@ export default {
const requestString = [];
requestString.push("const xhr = new XMLHttpRequest()");
const user = this.auth === "Basic Auth" ? `'${this.httpUser}'` : null;
const pswd =
const password =
this.auth === "Basic Auth" ? `'${this.httpPassword}'` : null;
requestString.push(
`xhr.open('${this.method}', '${this.url}${this.pathName}${this.queryString}', true, ${user}, ${pswd})`
`xhr.open('${this.method}', '${this.url}${this.pathName}${this.queryString}', true, ${user}, ${password})`
);
if (this.auth === "Bearer Token" || this.auth === "OAuth 2.0") {
requestString.push(