Some Code Cleanup
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user