small fixes

This commit is contained in:
Alireza Ahmadi
2024-07-23 17:28:10 +02:00
parent e287ced0e4
commit 7b58edeaaf
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import axios from 'axios';
import axios from 'axios'
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
@@ -50,7 +50,7 @@ axios.interceptors.response.use(
}
return Promise.reject(error)
}
);
)
const api = axios.create()
+1 -1
View File
@@ -85,4 +85,4 @@ const HttpUtils = {
},
}
export default HttpUtils;
export default HttpUtils
+2 -2
View File
@@ -10,8 +10,8 @@ export interface Link {
}
function utf8ToBase64(utf8String: string): string {
const encodedUtf8 = encodeURIComponent(utf8String).replace(/%([0-9A-F]{2})/g, (_, p1) => String.fromCharCode(parseInt(p1, 16)));
return btoa(encodedUtf8);
const encodedUtf8 = encodeURIComponent(utf8String).replace(/%([0-9A-F]{2})/g, (_, p1) => String.fromCharCode(parseInt(p1, 16)))
return btoa(encodedUtf8)
}
export namespace LinkUtil {