Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
150a052d
Commit
150a052d
authored
Sep 12, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/match' into 'main'
修复中文用户名娱乐匹配失败的问题 See merge request
mycard/Neos!312
parents
e52bde55
b90127c5
Pipeline
#23452
passed with stages
in 13 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/api/mycard/match.ts
src/api/mycard/match.ts
+7
-2
No files found.
src/api/mycard/match.ts
View file @
150a052d
...
@@ -12,8 +12,7 @@ export async function match(
...
@@ -12,8 +12,7 @@ export async function match(
arena
:
string
=
"
entertain
"
,
arena
:
string
=
"
entertain
"
,
):
Promise
<
MatchInfo
|
undefined
>
{
):
Promise
<
MatchInfo
|
undefined
>
{
const
headers
=
{
const
headers
=
{
Authorization
:
Authorization
:
"
Basic
"
+
customBase64Encode
(
username
+
"
:
"
+
extraId
),
"
Basic
"
+
btoa
(
encodeURIComponent
(
username
)
+
"
:
"
+
extraId
),
};
};
let
response
:
Response
|
undefined
=
undefined
;
let
response
:
Response
|
undefined
=
undefined
;
const
params
=
new
URLSearchParams
({
const
params
=
new
URLSearchParams
({
...
@@ -38,3 +37,9 @@ export async function match(
...
@@ -38,3 +37,9 @@ export async function match(
return
(
await
response
?.
json
())
as
MatchInfo
;
return
(
await
response
?.
json
())
as
MatchInfo
;
}
}
function
customBase64Encode
(
input
:
string
):
string
{
const
uint8Array
=
new
TextEncoder
().
encode
(
input
);
const
base64String
=
btoa
(
String
.
fromCharCode
(...
uint8Array
));
return
base64String
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment