Some Code Cleanup

This commit is contained in:
2023-12-27 19:16:54 +01:00
parent 3108d9bf20
commit 9a16c4b560
38 changed files with 87 additions and 105 deletions

View File

@@ -18,10 +18,11 @@
*/
import type {ExtendedEvent, ShortEvent, SWEvent} from "@type/event";
import {fetchWithToken} from "./repo";
import {fetchWithToken, tokenStore} from "./repo";
import {ExtendedEventSchema, ShortEventSchema, SWEventSchema} from "@type/event.js";
import {z} from "zod";
import type {Dayjs} from "dayjs";
import {derived} from "svelte/store";
export interface CreateEvent {
name: string
@@ -95,3 +96,5 @@ export class EventRepo {
return res.ok;
}
}
export const eventRepo = derived(tokenStore, ($token) => new EventRepo($token));