mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2025-01-10 15:19:28 -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/);
|
match = url.match(/https:\/\/(.*)\/(.*)\/gitlab_proof/);
|
||||||
output.display = match[2];
|
output.display = match[2];
|
||||||
output.url = `https://${match[1]}/${match[2]}`;
|
output.url = `https://${match[1]}/${match[2]}`;
|
||||||
output.proofUrlFetch = `https://gitlab.com/api/v4/users?username=${match[2]}`;
|
output.proofUrlFetch = `https://${match[1]}/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`;
|
|
||||||
try {
|
try {
|
||||||
const opts = {
|
const opts = {
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -641,7 +640,7 @@ async function verifyProof(url, fingerprint) {
|
||||||
throw new Error('No user with username ' + match[2]);
|
throw new Error('No user with username ' + match[2]);
|
||||||
}
|
}
|
||||||
// Get project
|
// 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);
|
response = await fetch(output.proofUrlFetch, opts);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Response failed: ' + response.status);
|
throw new Error('Response failed: ' + response.status);
|
||||||
|
|
Loading…
Reference in a new issue