refactor: let to const

This commit is contained in:
jamesgeorge007
2020-02-01 22:48:06 +05:30
parent fa15457ce4
commit 3bd22f6b78

View File

@@ -2678,9 +2678,9 @@ export default {
}, },
uploadPayload() { uploadPayload() {
this.rawInput = true; this.rawInput = true;
let file = this.$refs.payload.files[0]; const file = this.$refs.payload.files[0];
if (file !== undefined && file !== null) { if (file !== undefined && file !== null) {
let reader = new FileReader(); const reader = new FileReader();
reader.onload = ({ target }) => { reader.onload = ({ target }) => {
this.rawParams = target.result; this.rawParams = target.result;
}; };
@@ -2721,7 +2721,7 @@ export default {
} }
}, },
async oauthRedirectReq() { async oauthRedirectReq() {
let tokenInfo = await oauthRedirect(); const tokenInfo = await oauthRedirect();
if (tokenInfo.hasOwnProperty("access_token")) { if (tokenInfo.hasOwnProperty("access_token")) {
this.bearerToken = tokenInfo.access_token; this.bearerToken = tokenInfo.access_token;
this.addOAuthToken({ this.addOAuthToken({
@@ -2773,7 +2773,7 @@ export default {
}, },
removeOAuthTokenReq(index) { removeOAuthTokenReq(index) {
const oldTokenReqs = this.tokenReqs.slice(); const oldTokenReqs = this.tokenReqs.slice();
let targetReqIndex = this.tokenReqs.findIndex( const targetReqIndex = this.tokenReqs.findIndex(
({ name }) => name === this.tokenReqName ({ name }) => name === this.tokenReqName
); );
if (targetReqIndex < 0) return; if (targetReqIndex < 0) return;
@@ -2790,7 +2790,7 @@ export default {
}); });
}, },
tokenReqChange({ target }) { tokenReqChange({ target }) {
let targetReq = this.tokenReqs.find(({ name }) => name === target.value); const targetReq = this.tokenReqs.find(({ name }) => name === target.value);
let { let {
oidcDiscoveryUrl, oidcDiscoveryUrl,
authUrl, authUrl,