mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2025-01-10 07:19:27 -07:00
Use specified instance domain
Use specified instance domain instead of gitlab.com.
This commit is contained in:
parent
be2cf693b1
commit
8d727607c0
1 changed files with 2 additions and 3 deletions
|
@ -621,8 +621,7 @@ async function verifyProof(url, fingerprint) {
|
|||
match = url.match(/https:\/\/(.*)\/(.*)\/gitlab_proof/);
|
||||
output.display = match[2];
|
||||
output.url = `https://${match[1]}/${match[2]}`;
|
||||
output.proofUrlFetch = `https://gitlab.com/api/v4/users?username=${match[2]}`;
|
||||
// output.proofUrlFetch = `https://gitlab.com/api/v4/projects?custom_attributes[search]=${match[2]}/gitlab_proof&custom_attributes[search_namespaces]=true`;
|
||||
output.proofUrlFetch = `https://${match[1]}/api/v4/users?username=${match[2]}`;
|
||||
try {
|
||||
const opts = {
|
||||
headers: {
|
||||
|
@ -641,7 +640,7 @@ async function verifyProof(url, fingerprint) {
|
|||
throw new Error('No user with username ' + match[2]);
|
||||
}
|
||||
// Get project
|
||||
output.proofUrlFetch = `https://gitlab.com/api/v4/users/${user.id}/projects`;
|
||||
output.proofUrlFetch = `https://${match[1]}/api/v4/users/${user.id}/projects`;
|
||||
response = await fetch(output.proofUrlFetch, opts);
|
||||
if (!response.ok) {
|
||||
throw new Error('Response failed: ' + response.status);
|
||||
|
|
Loading…
Reference in a new issue