Skip to content

Commit 8d79213

Browse files
committed
rename
1 parent f5c1043 commit 8d79213

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

api/specs/web-server/_users.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,23 @@ async def update_my_profile(_body: MyProfileRestPatch): ...
5555
description="Starts the phone registration process",
5656
status_code=status.HTTP_202_ACCEPTED,
5757
)
58-
async def my_profile_phone_register(_body: MyPhoneRegister): ...
58+
async def my_phone_register(_body: MyPhoneRegister): ...
5959

6060

6161
@router.post(
6262
"/me/phone:resend",
6363
description="Resends the phone registration code",
6464
status_code=status.HTTP_202_ACCEPTED,
6565
)
66-
async def my_profile_phone_resend(): ...
66+
async def my_phone_resend(): ...
6767

6868

6969
@router.post(
7070
"/me/phone:confirm",
7171
description="Confirms the phone registration",
7272
status_code=status.HTTP_204_NO_CONTENT,
7373
)
74-
async def my_profile_phone_confirm(_body: MyPhoneConfirm): ...
74+
async def my_phone_confirm(_body: MyPhoneConfirm): ...
7575

7676

7777
@router.patch(

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ paths:
12081208
- users
12091209
summary: My Phone Register
12101210
description: Starts the phone registration process
1211-
operationId: my_profile_phone_register
1211+
operationId: my_phone_register
12121212
requestBody:
12131213
content:
12141214
application/json:
@@ -1227,7 +1227,7 @@ paths:
12271227
- users
12281228
summary: My Phone Resend
12291229
description: Resends the phone registration code
1230-
operationId: my_profile_phone_resend
1230+
operationId: my_phone_resend
12311231
responses:
12321232
'202':
12331233
description: Successful Response
@@ -1240,7 +1240,7 @@ paths:
12401240
- users
12411241
summary: My Phone Confirm
12421242
description: Confirms the phone registration
1243-
operationId: my_profile_phone_confirm
1243+
operationId: my_phone_confirm
12441244
requestBody:
12451245
content:
12461246
application/json:

services/web/server/src/simcore_service_webserver/users/_controller/rest/users_rest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ async def update_my_profile(request: web.Request) -> web.Response:
9595
#
9696

9797

98-
@routes.post(f"/{API_VTAG}/me/phone:register", name="my_profile_phone_register")
98+
@routes.post(f"/{API_VTAG}/me/phone:register", name="my_phone_register")
9999
@login_required
100100
@permission_required("user.profile.update")
101101
@requires_dev_feature_enabled
102102
@handle_rest_requests_exceptions
103-
async def my_profile_phone_register(request: web.Request) -> web.Response:
103+
async def my_phone_register(request: web.Request) -> web.Response:
104104
req_ctx = UsersRequestContext.model_validate(request)
105105
phone_register = await parse_request_body_as(MyPhoneRegister, request)
106106

@@ -109,25 +109,25 @@ async def my_profile_phone_register(request: web.Request) -> web.Response:
109109
raise NotImplementedError(msg)
110110

111111

112-
@routes.post(f"/{API_VTAG}/me/phone:resend", name="my_profile_phone_resend")
112+
@routes.post(f"/{API_VTAG}/me/phone:resend", name="my_phone_resend")
113113
@login_required
114114
@permission_required("user.profile.update")
115115
@requires_dev_feature_enabled
116116
@handle_rest_requests_exceptions
117-
async def my_profile_phone_resend(request: web.Request) -> web.Response:
117+
async def my_phone_resend(request: web.Request) -> web.Response:
118118
req_ctx = UsersRequestContext.model_validate(request)
119119

120120
# NOTE: Implementation will be added in next PR
121121
msg = "Phone code resend not yet implemented"
122122
raise NotImplementedError(msg)
123123

124124

125-
@routes.post(f"/{API_VTAG}/me/phone:confirm", name="my_profile_phone_confirm")
125+
@routes.post(f"/{API_VTAG}/me/phone:confirm", name="my_phone_confirm")
126126
@login_required
127127
@permission_required("user.profile.update")
128128
@requires_dev_feature_enabled
129129
@handle_rest_requests_exceptions
130-
async def my_profile_phone_confirm(request: web.Request) -> web.Response:
130+
async def my_phone_confirm(request: web.Request) -> web.Response:
131131
req_ctx = UsersRequestContext.model_validate(request)
132132
phone_confirm = await parse_request_body_as(MyPhoneConfirm, request)
133133

services/web/server/tests/unit/with_dbs/03/test_users_rest_profiles.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ async def test_phone_registration_basic_workflow(
612612

613613
# REGISTER phone number
614614
new_phone = faker.phone_number()
615-
url = client.app.router["my_profile_phone_register"].url_for()
615+
url = client.app.router["my_phone_register"].url_for()
616616
resp = await client.post(
617617
f"{url}",
618618
json={
@@ -622,7 +622,7 @@ async def test_phone_registration_basic_workflow(
622622
await assert_status(resp, status.HTTP_202_ACCEPTED)
623623

624624
# CONFIRM phone registration
625-
url = client.app.router["my_profile_phone_confirm"].url_for()
625+
url = client.app.router["my_phone_confirm"].url_for()
626626
resp = await client.post(
627627
f"{url}",
628628
json={
@@ -668,7 +668,7 @@ async def test_phone_registration_workflow(
668668

669669
# STEP 1: REGISTER phone number
670670
new_phone = faker.phone_number()
671-
url = client.app.router["my_profile_phone_register"].url_for()
671+
url = client.app.router["my_phone_register"].url_for()
672672
resp = await client.post(
673673
f"{url}",
674674
json={
@@ -678,7 +678,7 @@ async def test_phone_registration_workflow(
678678
await assert_status(resp, status.HTTP_202_ACCEPTED)
679679

680680
# STEP 2: CONFIRM phone registration
681-
url = client.app.router["my_profile_phone_confirm"].url_for()
681+
url = client.app.router["my_phone_confirm"].url_for()
682682
resp = await client.post(
683683
f"{url}",
684684
json={
@@ -716,7 +716,7 @@ async def test_phone_registration_with_resend(
716716

717717
# STEP 1: REGISTER phone number
718718
new_phone = faker.phone_number()
719-
url = client.app.router["my_profile_phone_register"].url_for()
719+
url = client.app.router["my_phone_register"].url_for()
720720
resp = await client.post(
721721
f"{url}",
722722
json={
@@ -726,12 +726,12 @@ async def test_phone_registration_with_resend(
726726
await assert_status(resp, status.HTTP_202_ACCEPTED)
727727

728728
# STEP 2: RESEND code (optional step)
729-
url = client.app.router["my_profile_phone_resend"].url_for()
729+
url = client.app.router["my_phone_resend"].url_for()
730730
resp = await client.post(f"{url}")
731731
await assert_status(resp, status.HTTP_202_ACCEPTED)
732732

733733
# STEP 3: CONFIRM phone registration
734-
url = client.app.router["my_profile_phone_confirm"].url_for()
734+
url = client.app.router["my_phone_confirm"].url_for()
735735
resp = await client.post(
736736
f"{url}",
737737
json={
@@ -762,7 +762,7 @@ async def test_phone_registration_change_existing_phone(
762762

763763
# Set initial phone
764764
first_phone = faker.phone_number()
765-
url = client.app.router["my_profile_phone_register"].url_for()
765+
url = client.app.router["my_phone_register"].url_for()
766766
resp = await client.post(
767767
f"{url}",
768768
json={
@@ -771,7 +771,7 @@ async def test_phone_registration_change_existing_phone(
771771
)
772772
await assert_status(resp, status.HTTP_202_ACCEPTED)
773773

774-
url = client.app.router["my_profile_phone_confirm"].url_for()
774+
url = client.app.router["my_phone_confirm"].url_for()
775775
resp = await client.post(
776776
f"{url}",
777777
json={
@@ -782,7 +782,7 @@ async def test_phone_registration_change_existing_phone(
782782

783783
# Change to new phone
784784
new_phone = faker.phone_number()
785-
url = client.app.router["my_profile_phone_register"].url_for()
785+
url = client.app.router["my_phone_register"].url_for()
786786
resp = await client.post(
787787
f"{url}",
788788
json={
@@ -791,7 +791,7 @@ async def test_phone_registration_change_existing_phone(
791791
)
792792
await assert_status(resp, status.HTTP_202_ACCEPTED)
793793

794-
url = client.app.router["my_profile_phone_confirm"].url_for()
794+
url = client.app.router["my_phone_confirm"].url_for()
795795
resp = await client.post(
796796
f"{url}",
797797
json={
@@ -820,7 +820,7 @@ async def test_phone_registration_change_existing_phone(
820820
)
821821
await assert_status(resp, status.HTTP_202_ACCEPTED)
822822

823-
url = client.app.router["register_my_profile_phone_confirm"].url_for()
823+
url = client.app.router["register_my_phone_confirm"].url_for()
824824
resp = await client.post(
825825
f"{url}",
826826
json={

0 commit comments

Comments
 (0)