diff --git a/src/controllers/AccountController.ts b/src/controllers/AccountController.ts index 62fca01..d10e9fb 100644 --- a/src/controllers/AccountController.ts +++ b/src/controllers/AccountController.ts @@ -206,6 +206,30 @@ export class AccountController { 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 * diff --git a/src/controllers/Routes.ts b/src/controllers/Routes.ts index 93c7db3..6c54671 100644 --- a/src/controllers/Routes.ts +++ b/src/controllers/Routes.ts @@ -57,6 +57,10 @@ export const Routes : Route[] = [ {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 {path: "/user/getInfo", cb: (h) => UserController.GetSingle(h), needLogin: false},