Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaartis
admin-fe
Commits
62de18c4
Commit
62de18c4
authored
5 years ago
by
vaartis
Browse files
Options
Downloads
Patches
Plain Diff
Add baseName to some remote instance requests
parent
9376da91
No related branches found
No related tags found
No related merge requests found
Pipeline
#17569
passed
5 years ago
Stage: lint
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/api/emoji_packs.js
+2
-2
2 additions, 2 deletions
src/api/emoji_packs.js
src/api/utils.js
+1
-1
1 addition, 1 deletion
src/api/utils.js
with
3 additions
and
3 deletions
src/api/emoji_packs.js
+
2
−
2
View file @
62de18c4
...
...
@@ -54,7 +54,7 @@ export async function listRemotePacks(host, token, instance) {
url
:
`/api/pleroma/emoji/packs/list_from`
,
method
:
'
post
'
,
headers
:
authHeaders
(
token
),
data
:
{
instance_address
:
instance
}
data
:
{
instance_address
:
baseName
(
instance
)
}
})
}
...
...
@@ -68,7 +68,7 @@ export async function downloadFrom(host, instance_address, pack_name, as, token)
url
:
'
/api/pleroma/emoji/packs/download_from
'
,
method
:
'
post
'
,
headers
:
authHeaders
(
token
),
data
:
{
instance_address
,
pack_name
,
as
},
data
:
{
instance_address
:
baseName
(
instance_address
)
,
pack_name
,
as
},
timeout
:
0
})
}
...
...
This diff is collapsed.
Click to expand it.
src/api/utils.js
+
1
−
1
View file @
62de18c4
...
...
@@ -2,7 +2,7 @@ const isLocalhost = (instanceName) =>
instanceName
.
startsWith
(
'
localhost:
'
)
||
instanceName
.
startsWith
(
'
127.0.0.1:
'
)
export
const
baseName
=
(
instanceName
)
=>
{
if
(
instanceName
.
match
(
/
^
http
?
:
\/\/
/
))
{
if
(
instanceName
.
match
(
/http
s
?
:
\/\/
/
))
{
return
instanceName
}
else
{
return
isLocalhost
(
instanceName
)
?
`http://
${
instanceName
}
`
:
`https://
${
instanceName
}
`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment