MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / postDeleteMessage

Method postDeleteMessage

packages/hydrooj/src/handler/home.ts:611–616  ·  view source on GitHub ↗
({ }, messageId: ObjectId)

Source from the content-addressed store, hash-verified

609
610 @param('messageId', Types.ObjectId)
611 async postDeleteMessage({ }, messageId: ObjectId) {
612 const msg = await message.get(messageId);
613 if (msg.from === this.user._id) await message.del(messageId);
614 else throw new PermissionError();
615 this.back();
616 }
617}
618
619export const inject = ['oauth'];

Callers

nothing calls this directly

Calls 3

backMethod · 0.80
getMethod · 0.45
delMethod · 0.45

Tested by

no test coverage detected