Adding <Wpt>

This commit is contained in:
vdv committed 2022-11-28 11:52:50 +01:00
1 parent ec5d90f768
commit 6121df68bf
9 files changed
+124 -10

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ export const getFamily = async (key: string, options: any = {}) => {
};
export const get = async (id: string) => {
await db.get(id);
return await db.get(id);
};
export const putAll = async (docs: any[]) => {
+8 -1
View File
@@ -1,6 +1,6 @@
import getUri from '../lib/ids';
import { putNewGpx } from './gpx';
import { put } from './lib';
import { get, put } from './lib';
export const emptyWpt: Wpt = {
$: { lat: 0, lon: 0 },
@@ -42,3 +42,10 @@ export const putNewWpt = async (id?: IdGpx | IdWpt) => {
);
return finalId as IdWpt;
};
export const getWpt = async (params: any) => {
const { id } = params;
const doc = await get(id);
return doc.doc;
};