♻️ Refactor
This commit is contained in:
@@ -74,7 +74,9 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
defineTheme() {
|
defineTheme() {
|
||||||
if (this.theme) return this.theme;
|
if (this.theme) {
|
||||||
|
return this.theme;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
this.$store.state.postwoman.settings.THEME_ACE_EDITOR || DEFAULT_THEME
|
this.$store.state.postwoman.settings.THEME_ACE_EDITOR || DEFAULT_THEME
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1884,10 +1884,10 @@ export default {
|
|||||||
const requestString = [];
|
const requestString = [];
|
||||||
requestString.push("const xhr = new XMLHttpRequest()");
|
requestString.push("const xhr = new XMLHttpRequest()");
|
||||||
const user = this.auth === "Basic Auth" ? `'${this.httpUser}'` : null;
|
const user = this.auth === "Basic Auth" ? `'${this.httpUser}'` : null;
|
||||||
const pswd =
|
const password =
|
||||||
this.auth === "Basic Auth" ? `'${this.httpPassword}'` : null;
|
this.auth === "Basic Auth" ? `'${this.httpPassword}'` : null;
|
||||||
requestString.push(
|
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") {
|
if (this.auth === "Bearer Token" || this.auth === "OAuth 2.0") {
|
||||||
requestString.push(
|
requestString.push(
|
||||||
|
|||||||
Reference in New Issue
Block a user