Commit ce2c0d7c authored by Chunchi Che's avatar Chunchi Che

fix match when username is Chinese

parent 93bd20cc
Pipeline #23431 passed with stages
in 17 minutes and 18 seconds
...@@ -11,7 +11,10 @@ export async function match( ...@@ -11,7 +11,10 @@ export async function match(
extraId: number, extraId: number,
arena: string = "entertain", arena: string = "entertain",
): Promise<MatchInfo | undefined> { ): Promise<MatchInfo | undefined> {
const headers = { Authorization: "Basic " + btoa(username + ":" + extraId) }; const headers = {
Authorization:
"Basic " + btoa(encodeURIComponent(username) + ":" + extraId),
};
let response: Response | undefined = undefined; let response: Response | undefined = undefined;
const params = new URLSearchParams({ const params = new URLSearchParams({
arena, arena,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment