mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-21 21:09:22 +00:00
Can check user password
This commit is contained in:
parent
c499a8abfd
commit
12f81f4d2c
@ -113,6 +113,8 @@ export const Routes : Route[] = [
|
||||
|
||||
{path: "/settings/set_security", cb: (h) => SettingsController.SetSecurity(h)},
|
||||
|
||||
{path: "/settings/check_password", cb: (h) => SettingsController.CheckUserPassword(h)},
|
||||
|
||||
{path: "/settings/update_password", cb: (h) => SettingsController.UpdatePassword(h)},
|
||||
|
||||
{path: "/settings/get_account_image", cb: (h) => SettingsController.GetAccountImageSettings(h)},
|
||||
|
@ -190,6 +190,18 @@ export class SettingsController {
|
||||
h.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check current user password
|
||||
*
|
||||
* @param h Request handler
|
||||
*/
|
||||
public static async CheckUserPassword(h: RequestHandler) {
|
||||
|
||||
await h.needUserPostPassword("password");
|
||||
|
||||
h.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update user password
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user