🎨 Lint project

This commit is contained in:
Rune Harlyk
2025-10-11 10:54:07 +02:00
parent 91a7b170fe
commit a77eb0b1e0
36 changed files with 77 additions and 72 deletions
+8 -8
View File
@@ -2,20 +2,20 @@ import { get } from 'svelte/store'
import { Err, Ok, type Result } from './utilities'
import { location } from './stores'
export namespace api {
export function get<TResponse>(endpoint: string, params?: RequestInit) {
export const api = {
get<TResponse>(endpoint: string, params?: RequestInit) {
return sendRequest<TResponse>(endpoint, 'GET', null, params)
}
},
export function post<TResponse>(endpoint: string, data?: unknown) {
post<TResponse>(endpoint: string, data?: unknown) {
return sendRequest<TResponse>(endpoint, 'POST', data)
}
},
export function put<TResponse>(endpoint: string, data?: unknown) {
put<TResponse>(endpoint: string, data?: unknown) {
return sendRequest<TResponse>(endpoint, 'PUT', data)
}
},
export function remove<TResponse>(endpoint: string) {
remove<TResponse>(endpoint: string) {
return sendRequest<TResponse>(endpoint, 'DELETE')
}
}