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:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user