mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 13:29:22 +00:00
Added placeholders for data export and account deletion
This commit is contained in:
parent
994d1540dc
commit
aac5d02a4f
@ -206,6 +206,30 @@ export class AccountController {
|
|||||||
h.success("Password changed!");
|
h.success("Password changed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Export the data of the user
|
||||||
|
*
|
||||||
|
* @param h Request handler
|
||||||
|
*/
|
||||||
|
public static async ExportData(h: RequestHandler) {
|
||||||
|
await h.needUserPostPassword("password");
|
||||||
|
|
||||||
|
// TODO : implement
|
||||||
|
h.error(500, "Method not implemented yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a user account
|
||||||
|
*
|
||||||
|
* @param h Request handler
|
||||||
|
*/
|
||||||
|
public static async DeleteAccount(h: RequestHandler) {
|
||||||
|
await h.needUserPostPassword("password");
|
||||||
|
|
||||||
|
// TODO : implement
|
||||||
|
h.error(500, "Method not implemented yet.");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the user ID associated to a password reset token
|
* Get the user ID associated to a password reset token
|
||||||
*
|
*
|
||||||
|
@ -57,6 +57,10 @@ export const Routes : Route[] = [
|
|||||||
|
|
||||||
{path: "/account/reset_user_passwd", cb: (h) => AccountController.ResetUserPassword(h), needLogin: false},
|
{path: "/account/reset_user_passwd", cb: (h) => AccountController.ResetUserPassword(h), needLogin: false},
|
||||||
|
|
||||||
|
{path: "/account/export_data", cb: (h) => AccountController.ExportData(h)},
|
||||||
|
|
||||||
|
{path: "/account/delete", cb: (h) => AccountController.DeleteAccount(h)},
|
||||||
|
|
||||||
|
|
||||||
// User controller
|
// User controller
|
||||||
{path: "/user/getInfo", cb: (h) => UserController.GetSingle(h), needLogin: false},
|
{path: "/user/getInfo", cb: (h) => UserController.GetSingle(h), needLogin: false},
|
||||||
|
Loading…
Reference in New Issue
Block a user