1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-21 00:55:17 +00:00

Start delete group method

This commit is contained in:
2019-12-27 18:49:40 +01:00
parent 2222873d69
commit 820b861ef8
4 changed files with 49 additions and 0 deletions

View File

@ -374,6 +374,19 @@ export class RequestHandler {
this.error(412, "Please check your login tokens!");
}
/**
* Check the user password included in the request
*
* @param postField The name of the post field
* containing user password
*/
public async needUserPostPassword(postField: string) {
const password = this.postString(postField, 3);
if(!await AccountHelper.CheckUserPassword(this.getUserId(), password))
this.error(401, "Invalid password!");
}
/**
* Get information about API client
*/