Use the correct scheme for URIs

This commit is contained in:
Eli Ribble 2026-04-02 01:18:25 +00:00
parent 124d1b7078
commit 353a3ea442
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View file

@ -56,6 +56,7 @@ func (r *router) IDToURI(route string, id int) (string, error) {
if err != nil {
return "", fmt.Errorf("build uri: %w", err)
}
uri.Scheme = "https"
return uri.String(), nil
}
@ -71,6 +72,7 @@ func (r *router) UUIDToURI(route string, u *uuid.UUID) (*string, error) {
if err != nil {
return nil, fmt.Errorf("build uri: %w", err)
}
uri.Scheme = "https"
result := uri.String()
return &result, nil
}

View file

@ -367,7 +367,7 @@ const saveChanges = async () => {
console.log("empty user");
return;
}
const url = "/api" + u.uri;
const url = u.uri;
const response = await fetch(url, {
method: "PUT",
headers: {