1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-26 13:38:52 +00:00

Can not delete my account

This commit is contained in:
Pierre HUBERT 2020-04-18 13:17:43 +02:00
parent 2b02035ee3
commit 9cdb3260e5

View File

@ -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.");