add: ability to add user to stack through block list ui

This commit is contained in:
trisua 2025-06-22 21:07:35 -04:00
parent 8c969cd56f
commit 2a77c61bf2
10 changed files with 130 additions and 20 deletions

View file

@ -806,6 +806,25 @@
return [access_token, refresh_token, expires_in];
});
self.define("refresh", async (_, refresh_token) => {
const [new_token, new_refresh_token, expires_in] = await trigger(
"spotify::refresh_token",
[client_id, refresh_token],
);
await trigger("connections::push_con_data", [
"Spotify",
{
token: new_token,
refresh_token: new_refresh_token,
expires_in: expires_in.toString(),
name: profile.display_name,
},
]);
return [new_token, refresh_token];
});
self.define("profile", async (_, token) => {
return await (
await fetch("https://api.spotify.com/v1/me", {