Begin switch to gorilla/mux

I'm realizing with this code that I'm going to have a problem if I want
to do HATEOAS-style APIs. chi just doesn't do resource-oriented API
design, and I'd have to build a lot of stuff myself.

I'm in the middle of swapping out the UI. Now is the time to make the
switch.
This commit is contained in:
Eli Ribble 2026-04-01 15:32:27 +00:00
parent c253e655b1
commit 5172400803
No known key found for this signature in database
4 changed files with 53 additions and 6 deletions

View file

@ -362,11 +362,12 @@ const saveChanges = async () => {
console.error("Failed to upload avatar", error);
}
}
const url = session.urls?.api.user;
if (!url) {
console.log("empty avatar url");
const u = user.value;
if (!u) {
console.log("empty user");
return;
}
const url = "/api" + u.uri;
const response = await fetch(url, {
method: "PUT",
headers: {