spec: update mock

This commit is contained in:
undefined committed 2020-10-05 20:54:23 +08:00
1 parent daa5bffd8c
commit c49970f4be
3 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -4,8 +4,8 @@ import * as db from '../service/db';
export const coll = db.collection('oplog');
export async function add(data: Partial<OplogDoc>): Promise<ObjectID> {
const res = await coll.insertOne(data);
export async function add(data: Partial<OplogDoc> & { type: string }): Promise<ObjectID> {
const res = await coll.insertOne({ _id: new ObjectID(), ...data });
return res.insertedId;
}