MCPcopy Index your code
hub / github.com/hydro-dev/Hydro / add

Method add

packages/hydrooj/src/model/task.ts:102–110  ·  view source on GitHub ↗
(task: Partial<Task> & { type: string })

Source from the content-addressed store, hash-verified

100 static coll = coll;
101
102 static async add(task: Partial<Task> & { type: string }) {
103 const t: Task = {
104 ...task,
105 priority: task.priority ?? 0,
106 _id: new ObjectId(),
107 };
108 const res = await coll.insertOne(t);
109 return res.insertedId;
110 }
111
112 static async addMany(tasks: Task[]) {
113 const res = await coll.insertMany(tasks);

Callers 15

applyFunction · 0.45
upgrade.tsFile · 0.45
_addressFunction · 0.45
_discussionFunction · 0.45
_userFunction · 0.45
traverseFunction · 0.45
constructorMethod · 0.45
analyzeChangesMethod · 0.45
triggerLocalReloadMethod · 0.45
getFirstMethod · 0.45
base.tsFile · 0.45
addFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected