API & Client - rename data export endpoints

This commit is contained in:
Sam
2023-03-05 10:30:26 +01:00
parent 4aed07d458
commit 65a8ae0ae7
4 changed files with 22 additions and 22 deletions

View File

@ -2845,7 +2845,7 @@ class TestPostUserDataExportRequest(ApiTestCaseMixin):
)
response = client.post(
'/api/auth/profile/export/request',
'/api/auth/account/export/request',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -2871,7 +2871,7 @@ class TestPostUserDataExportRequest(ApiTestCaseMixin):
)
response = client.post(
'/api/auth/profile/export/request',
'/api/auth/account/export/request',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -2893,7 +2893,7 @@ class TestPostUserDataExportRequest(ApiTestCaseMixin):
)
response = client.post(
'/api/auth/profile/export/request',
'/api/auth/account/export/request',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -2919,7 +2919,7 @@ class TestPostUserDataExportRequest(ApiTestCaseMixin):
)
response = client.post(
'/api/auth/profile/export/request',
'/api/auth/account/export/request',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -2944,7 +2944,7 @@ class TestPostUserDataExportRequest(ApiTestCaseMixin):
)
client.post(
'/api/auth/profile/export/request',
'/api/auth/account/export/request',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -2974,7 +2974,7 @@ class TestPostUserDataExportRequest(ApiTestCaseMixin):
)
client.post(
'/api/auth/profile/export/request',
'/api/auth/account/export/request',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -3000,7 +3000,7 @@ class TestPostUserDataExportRequest(ApiTestCaseMixin):
)
client.post(
'/api/auth/profile/export/request',
'/api/auth/account/export/request',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -3025,7 +3025,7 @@ class TestGetUserDataExportRequest(ApiTestCaseMixin):
)
response = client.get(
'/api/auth/profile/export',
'/api/auth/account/export',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -3053,7 +3053,7 @@ class TestGetUserDataExportRequest(ApiTestCaseMixin):
)
response = client.get(
'/api/auth/profile/export',
'/api/auth/account/export',
content_type='application/json',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -3075,7 +3075,7 @@ class TestDownloadExportDataArchive(ApiTestCaseMixin):
)
response = client.get(
f'/api/auth/profile/export/{self.random_string()}',
f'/api/auth/account/export/{self.random_string()}',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -3095,7 +3095,7 @@ class TestDownloadExportDataArchive(ApiTestCaseMixin):
)
response = client.get(
f'/api/auth/profile/export/{archive_file_name}',
f'/api/auth/account/export/{archive_file_name}',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -3114,7 +3114,7 @@ class TestDownloadExportDataArchive(ApiTestCaseMixin):
)
response = client.get(
f'/api/auth/profile/export/{self.random_string()}',
f'/api/auth/account/export/{self.random_string()}',
headers=dict(Authorization=f'Bearer {auth_token}'),
)
@ -3136,7 +3136,7 @@ class TestDownloadExportDataArchive(ApiTestCaseMixin):
mock.return_value = 'file'
client.get(
f'/api/auth/profile/export/{archive_file_name}',
f'/api/auth/account/export/{archive_file_name}',
headers=dict(Authorization=f'Bearer {auth_token}'),
)

View File

@ -1688,7 +1688,7 @@ def accept_privacy_policy(auth_user: User) -> Union[Dict, HttpResponse]:
return handle_error_and_return_response(e, db=db)
@auth_blueprint.route('/auth/profile/export/request', methods=['POST'])
@auth_blueprint.route('/auth/account/export/request', methods=['POST'])
@require_auth()
def request_user_data_export(auth_user: User) -> Union[Dict, HttpResponse]:
"""
@ -1698,7 +1698,7 @@ def request_user_data_export(auth_user: User) -> Union[Dict, HttpResponse]:
.. sourcecode:: http
POST /auth/profile/export/request HTTP/1.1
POST /auth/account/export/request HTTP/1.1
Content-Type: application/json
**Example response**:
@ -1761,7 +1761,7 @@ def request_user_data_export(auth_user: User) -> Union[Dict, HttpResponse]:
return handle_error_and_return_response(e, db=db)
@auth_blueprint.route('/auth/profile/export', methods=['GET'])
@auth_blueprint.route('/auth/account/export', methods=['GET'])
@require_auth()
def get_user_data_export(auth_user: User) -> Union[Dict, HttpResponse]:
"""
@ -1777,7 +1777,7 @@ def get_user_data_export(auth_user: User) -> Union[Dict, HttpResponse]:
.. sourcecode:: http
GET /auth/profile/export HTTP/1.1
GET /auth/account/export HTTP/1.1
Content-Type: application/json
**Example response**:
@ -1829,7 +1829,7 @@ def get_user_data_export(auth_user: User) -> Union[Dict, HttpResponse]:
@auth_blueprint.route(
'/auth/profile/export/<string:file_name>', methods=['GET']
'/auth/account/export/<string:file_name>', methods=['GET']
)
@require_auth()
def download_data_export(
@ -1842,7 +1842,7 @@ def download_data_export(
.. sourcecode:: http
GET /auth/profile/export/download/archive_rgjsR3fHr5Yp.zip HTTP/1.1
GET /auth/account/export/download/archive_rgjsR3fHr5Yp.zip HTTP/1.1
Content-Type: application/json
**Example response**: