mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-30 01:06:27 +00:00
Can check given password
This commit is contained in:
parent
77d11a8210
commit
9c8116f9bd
@ -100,6 +100,7 @@ pub fn get_routes() -> Vec<Route> {
|
|||||||
Route::post("/settings/set_language", Box::new(settings_controller::set_language)),
|
Route::post("/settings/set_language", Box::new(settings_controller::set_language)),
|
||||||
Route::post("/settings/get_security", Box::new(settings_controller::get_security)),
|
Route::post("/settings/get_security", Box::new(settings_controller::get_security)),
|
||||||
Route::post("/settings/set_security", Box::new(settings_controller::set_security)),
|
Route::post("/settings/set_security", Box::new(settings_controller::set_security)),
|
||||||
|
Route::post("/settings/check_password", Box::new(settings_controller::check_password)),
|
||||||
|
|
||||||
// Friends controller
|
// Friends controller
|
||||||
Route::post("/friends/getList", Box::new(friends_controller::get_list)),
|
Route::post("/friends/getList", Box::new(friends_controller::get_list)),
|
||||||
|
@ -117,3 +117,10 @@ pub fn set_security(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
|
|
||||||
r.success("Security settings update.")
|
r.success("Security settings update.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Check user password
|
||||||
|
pub fn check_password(r: &mut HttpRequestHandler) -> RequestResult {
|
||||||
|
r.need_user_password("password")?;
|
||||||
|
|
||||||
|
r.success("The password is valid.")
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user