Skip to content
Open
105 changes: 0 additions & 105 deletions app/Controllers/User/leetcode_controller.py

This file was deleted.

4 changes: 2 additions & 2 deletions app/Controllers/User/statistics_controller.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from fastapi import APIRouter
from Settings.logging_config import get_logger
from Services.User.github_service import GitHubService
from Services.User.leetcode_service import LeetCodeService
from Services.User.statistics_service import StatisticsService

# Initialize logging
logger = get_logger()
Expand All @@ -21,4 +21,4 @@ async def getGitHubData(userName: str):
@router.get('/lc/{userName}')
async def getLeetCodeData(userName: str):
logger.info("GET Request LeetCode Data for user: " + userName)
return LeetCodeService.getAllLeetcodeData(userName)
return StatisticsService.getAllLeetcodeData(userName)
33 changes: 0 additions & 33 deletions app/Controllers/error_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
EducationNotFound,
GitHubUsernameAlreadyExists,
GitHubUsernameNotFound,
LeetcodeBadgeNotFound,
LeetcodeNotFound,
LeetcodeTagNotFound,
LinksAlreadyExists,
LinksNotFound,
LocationNotFound,
Expand Down Expand Up @@ -132,36 +129,6 @@ async def work_experience_not_found_handler(request: Request, exc: WorkExperienc
status=404
)

@app.exception_handler(LeetcodeNotFound)
async def leetcode_not_found_handler(request: Request, exc: LeetcodeNotFound):
logger.warning(f"LeetCode not found: {exc.leetcode_id}")
raise_api_error(
code=ErrorCodes.USER_LEETCODE_NF_A01,
error="LeetCode record not found",
detail=str(exc),
status=404
)

@app.exception_handler(LeetcodeBadgeNotFound)
async def leetcode_badge_not_found_handler(request: Request, exc: LeetcodeBadgeNotFound):
logger.warning(f"LeetCode badge not found: {exc.badge_id}")
raise_api_error(
code=ErrorCodes.USER_LEETCODE_NF_A02,
error="LeetCode badge not found",
detail=str(exc),
status=404
)

@app.exception_handler(LeetcodeTagNotFound)
async def leetcode_tag_not_found_handler(request: Request, exc: LeetcodeTagNotFound):
logger.warning(f"LeetCode tag not found: {exc.tag_id}")
raise_api_error(
code=ErrorCodes.USER_LEETCODE_NF_A03,
error="LeetCode tag not found",
detail=str(exc),
status=404
)

@app.exception_handler(CertificationNotFound)
async def certification_not_found_handler(request: Request, exc: CertificationNotFound):
logger.warning(f"Certificate not found: {exc.certificate_id}")
Expand Down
196 changes: 0 additions & 196 deletions app/Entities/leetcode_entity.py

This file was deleted.

Loading
Loading