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

Method post

packages/hydrooj/src/handler/user.ts:452–462  ·  view source on GitHub ↗
({ password })

Source from the content-addressed store, hash-verified

450
451class UserDeleteHandler extends Handler {
452 async post({ password }) {
453 await this.user.checkPassword(password);
454 const tid = await ScheduleModel.add({
455 executeAfter: moment().add(7, 'days').toDate(),
456 type: 'script',
457 id: 'deleteUser',
458 args: { uid: this.user._id },
459 });
460 await user.setById(this.user._id, { del: tid });
461 this.response.template = 'user_delete_pending.html';
462 }
463}
464
465class OauthHandler extends Handler {

Callers

nothing calls this directly

Calls 3

checkPasswordMethod · 0.80
setByIdMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected