(ts: Date)
| 345 | } |
| 346 | |
| 347 | function objid(ts: Date) { |
| 348 | const p = Math.floor(ts.getTime() / 1000).toString(16); |
| 349 | const id = new mongodb.ObjectId(); |
| 350 | return new mongodb.ObjectId(p + id.toHexString().slice(8, 8 + 6 + 4 + 6)); |
| 351 | } |
| 352 | |
| 353 | // FIXME this seems not working |
| 354 | async function message(src: Db, report: Report) { |