1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-25 23:09:22 +00:00

Added placeholders for data export and account deletion

This commit is contained in:
Pierre HUBERT 2019-12-30 13:50:59 +01:00
parent 994d1540dc
commit aac5d02a4f
2 changed files with 28 additions and 0 deletions

View File

@ -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
* *

View File

@ -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},