init
This commit is contained in:
@@ -69,3 +69,15 @@ export async function getStrengthWorkout(
|
||||
const collection = await getCollection();
|
||||
return collection.findOne({ _id: new ObjectId(id), userId });
|
||||
}
|
||||
|
||||
export async function setStrengthWorkoutNotes(
|
||||
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 } }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user