Some Code Cleanup
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {fetchWithToken} from "./repo.ts";
|
||||
import {fetchWithToken, tokenStore} from "./repo.ts";
|
||||
import {derived} from "svelte/store";
|
||||
|
||||
export class AuthRepo {
|
||||
constructor(private token: string) {
|
||||
@@ -38,4 +39,6 @@ export class AuthRepo {
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const authRepo = derived(tokenStore, ($token) => new AuthRepo($token));
|
||||
Reference in New Issue
Block a user