init
This commit is contained in:
@@ -47,6 +47,7 @@ export type RunningActivity = RunningActivityInput & {
|
||||
_id: ObjectId;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
notes?: string;
|
||||
routePoints?: RoutePoint[];
|
||||
elevationProfile?: number[];
|
||||
runMetrics?: RunMetrics;
|
||||
@@ -90,6 +91,18 @@ export async function getRunningActivity(
|
||||
return collection.findOne({ _id: new ObjectId(id), userId });
|
||||
}
|
||||
|
||||
export async function setRunningActivityNotes(
|
||||
userId: string,
|
||||
id: string,
|
||||
notes: string
|
||||
): Promise<void> {
|
||||
const collection = await getCollection();
|
||||
await collection.updateOne(
|
||||
{ _id: new ObjectId(id), userId },
|
||||
{ $set: { notes: notes.trim() || undefined } }
|
||||
);
|
||||
}
|
||||
|
||||
export async function setRunningActivityMetrics(
|
||||
userId: string,
|
||||
garminActivityId: number,
|
||||
|
||||
Reference in New Issue
Block a user