Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/core/auth/endpoints_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import urllib.parse
from datetime import UTC, datetime, timedelta
from typing import Any

import calypsso
import jwt
Expand Down Expand Up @@ -1046,6 +1047,7 @@ async def introspect_refresh_token(

@router.get(
"/auth/userinfo",
response_model=dict[str, Any],
status_code=200,
)
async def auth_get_userinfo(
Expand Down
8 changes: 8 additions & 0 deletions app/core/core_endpoints/endpoints_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async def read_information(

@router.get(
"/privacy",
response_model=str,
status_code=200,
)
async def read_privacy(settings: Settings = Depends(get_settings)):
Expand All @@ -57,6 +58,7 @@ async def read_privacy(settings: Settings = Depends(get_settings)):

@router.get(
"/terms-and-conditions",
response_model=str,
status_code=200,
)
async def read_terms_and_conditions(settings: Settings = Depends(get_settings)):
Expand All @@ -72,6 +74,7 @@ async def read_terms_and_conditions(settings: Settings = Depends(get_settings)):

@router.get(
"/mypayment-terms-of-service",
response_model=str,
status_code=200,
)
async def read_mypayment_tos(settings: Settings = Depends(get_settings)):
Expand All @@ -86,6 +89,7 @@ async def read_mypayment_tos(settings: Settings = Depends(get_settings)):

@router.get(
"/support",
response_model=str,
status_code=200,
)
async def read_support(settings: Settings = Depends(get_settings)):
Expand All @@ -101,6 +105,7 @@ async def read_support(settings: Settings = Depends(get_settings)):

@router.get(
"/security.txt",
response_model=str,
status_code=200,
)
async def read_security_txt(settings: Settings = Depends(get_settings)):
Expand All @@ -115,6 +120,7 @@ async def read_security_txt(settings: Settings = Depends(get_settings)):

@router.get(
"/.well-known/security.txt",
response_model=str,
status_code=200,
)
async def read_wellknown_security_txt(settings: Settings = Depends(get_settings)):
Expand All @@ -130,6 +136,7 @@ async def read_wellknown_security_txt(settings: Settings = Depends(get_settings)

@router.get(
"/robots.txt",
response_model=str,
status_code=200,
)
async def read_robots_txt(settings: Settings = Depends(get_settings)):
Expand All @@ -145,6 +152,7 @@ async def read_robots_txt(settings: Settings = Depends(get_settings)):

@router.get(
"/account-deletion",
response_model=str,
status_code=200,
)
async def read_account_deletion(settings: Settings = Depends(get_settings)):
Expand Down
2 changes: 1 addition & 1 deletion app/core/google_api/endpoints_google_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
hyperion_error_logger = logging.getLogger("hyperion.error")


@router.get("/google-api/oauth2callback", status_code=200)
@router.get("/google-api/oauth2callback", response_model=str, status_code=200)
async def google_api_callback(
request: Request,
db: AsyncSession = Depends(get_db),
Expand Down
2 changes: 1 addition & 1 deletion app/core/memberships/endpoints_memberships.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ async def delete_user_membership(

@router.post(
"/memberships/{membership_id}/group/{group_id}/synchronize",
status_code=201,
status_code=204,
)
async def synchronize_membership_with_group(
membership_id: uuid.UUID,
Expand Down
3 changes: 2 additions & 1 deletion app/core/mypayment/endpoints_mypayment.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ async def delete_structure(

@router.post(
"/mypayment/structures/{structure_id}/init-manager-transfer",
status_code=201,
status_code=204,
)
async def init_transfer_structure_manager(
structure_id: UUID,
Expand Down Expand Up @@ -2213,6 +2213,7 @@ async def validate_can_scan_qrcode(
@router.post(
"/mypayment/stores/{store_id}/scan",
status_code=201,
response_model=schemas_mypayment.TransactionBase,
)
async def store_scan_qrcode(
store_id: UUID,
Expand Down
2 changes: 1 addition & 1 deletion app/core/notification/endpoints_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async def send_notification(

@router.post(
"/notification/test/send",
status_code=201,
status_code=204,
)
async def send_test_notification(
user_id: str | None = None,
Expand Down
3 changes: 1 addition & 2 deletions app/core/permissions/endpoints_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def read_permission(

@router.post(
"/permissions/",
status_code=201,
status_code=204,
)
async def create_permission(
permission: schemas_permissions.CoreGroupPermission
Expand All @@ -124,7 +124,6 @@ async def create_permission(
await cruds_permissions.create_group_permission(permission, db)
else:
await cruds_permissions.create_account_type_permission(permission, db)
return {"message": "Permission created successfully"}


@router.delete(
Expand Down
3 changes: 2 additions & 1 deletion app/core/users/endpoints_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ async def activate_user(

@router.post(
"/users/s3-init",
status_code=201,
status_code=204,
)
async def init_s3_for_users(
db: AsyncSession = Depends(get_db),
Expand Down Expand Up @@ -805,6 +805,7 @@ async def migrate_mail(

@router.get(
"/users/migrate-mail-confirm",
response_model=str,
status_code=200,
)
async def migrate_mail_confirm(
Expand Down
2 changes: 1 addition & 1 deletion app/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ async def execute_async_or_sync_method(
def patch_identity_in_text(
text: str,
settings: "Settings",
):
) -> str:
"""
Patch the given text with the identity of the school.
This is used to replace the identity placeholders in the legal texts with the values defined in the settings.
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_mypayment.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ async def test_transfer_structure_manager_as_manager(
"new_manager_user_id": ecl_user2.id,
},
)
assert response.status_code == 201
assert response.status_code == 204

response = client.get(
"/mypayment/structures/confirm-manager-transfer",
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_create_permission(client: TestClient) -> None:
},
headers={"Authorization": f"Bearer {admin_token}"},
)
assert response.status_code == 201
assert response.status_code == 204

response = client.get(
f"/permissions/{BookingPermissions.manage_managers.value}",
Expand Down
Loading