adds user management

This commit is contained in:
Christian Beutel
2024-02-02 22:48:24 +01:00
parent 99f743ec94
commit 905995a01c
60 changed files with 1135 additions and 128 deletions

View File

@@ -1,4 +1,4 @@
import { pb } from "$lib/constants";
import { pb } from "$lib/pocketbase";
import { Waypoint } from "$lib/models/waypoint";
import { writable, type Writable } from "svelte/store";
@@ -13,6 +13,14 @@ export async function waypoints_create(bodyParams?: { [key: string]: any; } | Fo
return model;
}
export async function waypoints_update(updatedWaypoint: Waypoint) {
const model = await pb
.collection("waypoints")
.update(updatedWaypoint.id!, updatedWaypoint);
return model;
}
export async function waypoints_delete(id: string) {
const success = await pb
.collection("waypoints")