adds user management
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user