mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-10-31 01:24:43 +00:00 
			
		
		
		
	Added placeholders for data export and account deletion
This commit is contained in:
		| @@ -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 | ||||
| 	 *  | ||||
|   | ||||
| @@ -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}, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user