diff --git a/src/controllers/AccountController.ts b/src/controllers/AccountController.ts index d6c206f..f71a918 100644 --- a/src/controllers/AccountController.ts +++ b/src/controllers/AccountController.ts @@ -303,6 +303,9 @@ export class AccountController { public static async DeleteAccount(h: RequestHandler) { await h.needUserPostPassword("password"); + if(h.getUserId() < 2) + h.error(401, "You will not delete MY account!"); + await AccountHelper.Delete(h.getUserId()); h.error(500, "Method not completely implemented yet.");