mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 13:29:22 +00:00
Can not delete my account
This commit is contained in:
parent
2b02035ee3
commit
9cdb3260e5
@ -303,6 +303,9 @@ export class AccountController {
|
|||||||
public static async DeleteAccount(h: RequestHandler) {
|
public static async DeleteAccount(h: RequestHandler) {
|
||||||
await h.needUserPostPassword("password");
|
await h.needUserPostPassword("password");
|
||||||
|
|
||||||
|
if(h.getUserId() < 2)
|
||||||
|
h.error(401, "You will not delete MY account!");
|
||||||
|
|
||||||
await AccountHelper.Delete(h.getUserId());
|
await AccountHelper.Delete(h.getUserId());
|
||||||
|
|
||||||
h.error(500, "Method not completely implemented yet.");
|
h.error(500, "Method not completely implemented yet.");
|
||||||
|
Loading…
Reference in New Issue
Block a user