1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-22 05:19:22 +00:00

Can check user password

This commit is contained in:
Pierre HUBERT 2020-04-29 19:42:20 +02:00
parent c499a8abfd
commit 12f81f4d2c
2 changed files with 14 additions and 0 deletions

View File

@ -113,6 +113,8 @@ export const Routes : Route[] = [
{path: "/settings/set_security", cb: (h) => SettingsController.SetSecurity(h)}, {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/update_password", cb: (h) => SettingsController.UpdatePassword(h)},
{path: "/settings/get_account_image", cb: (h) => SettingsController.GetAccountImageSettings(h)}, {path: "/settings/get_account_image", cb: (h) => SettingsController.GetAccountImageSettings(h)},

View File

@ -190,6 +190,18 @@ export class SettingsController {
h.success(); 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 * Update user password
* *