Add random length and some more house-keeping

This commit is contained in:
2025-05-12 17:36:51 +03:00
parent 7096302999
commit ce5d77d32f
7 changed files with 52 additions and 34 deletions

View File

@@ -57,12 +57,12 @@ export const useStrava = async (userId: number) => {
.where(eq(tables.tokens.userId, userId));
}
return tryit(
$fetch.create({
baseURL: "https://www.strava.com/api/v3/",
onRequest({ options }) {
options.headers.set("Authorization", `Bearer ${tokens?.accessToken}`);
},
}),
);
const client = $fetch.create({
baseURL: "https://www.strava.com/api/v3/",
onRequest({ options }) {
options.headers.set("Authorization", `Bearer ${tokens?.accessToken}`);
},
});
return client;
};