29 Commits

Author SHA1 Message Date
508984442b Update dependency scipy to ~=1.13.0 2024-04-19 22:09:00 +03:00
37a6b4634c Merge pull request 'Update dependency fastapi to v0.110.2' (#53) from renovate/fastapi-0.x into dev
Reviewed-on: #53
2024-04-19 21:33:30 +03:00
5796c6ea40 Update dependency fastapi to v0.110.2 2024-04-19 04:29:24 +03:00
b488bbee0a Merge pull request 'Update dependency fastapi to v0.110.1' (#51) from renovate/fastapi-0.x into dev
Reviewed-on: #51
2024-04-02 15:09:18 +03:00
43597db03c Update dependency fastapi to v0.110.1 2024-04-02 07:04:42 +03:00
e6f3b7c4b1 Merge pull request 'Update dependency fastapi to v0.110.0' (#50) from renovate/fastapi-0.x into dev
Reviewed-on: #50
2024-02-25 22:31:46 +02:00
e91a6ad10e Update dependency fastapi to v0.110.0 2024-02-25 02:14:24 +02:00
aa6c5b99b1 Merge pull request 'Update dependency fastapi to v0.109.2' (#47) from renovate/fastapi-0.x into dev
Reviewed-on: #47
2024-02-13 19:06:10 +02:00
0991734377 Update dependency fastapi to v0.109.2 2024-02-04 23:48:51 +02:00
d4aa6558d6 Merge pull request 'Update dependency fastapi to v0.109.1' (#46) from renovate/fastapi-0.x into dev
Reviewed-on: #46
2024-02-04 01:19:48 +02:00
186fddacef Update dependency fastapi to v0.109.1 2024-02-03 15:16:16 +02:00
bf006a0734 Merge pull request 'Update dependency fastapi to v0.109.0' (#44) from renovate/fastapi-0.x into dev
Reviewed-on: #44
2024-01-21 13:54:49 +02:00
9d70724d64 Merge pull request 'Update dependency scipy to ~=1.12.0' (#45) from renovate/scipy-1.x into dev
Reviewed-on: #45
2024-01-21 13:54:36 +02:00
8b30afdf6a Update dependency scipy to ~=1.12.0 2024-01-21 00:09:11 +02:00
0db4661658 Update dependency fastapi to v0.109.0 2024-01-11 18:03:38 +02:00
bf4fbe2302 Merge pull request 'Update dependency opencv-python to ~=4.9.0.80' (#43) from renovate/opencv-python-4.x into dev
Reviewed-on: #43
2024-01-02 13:11:58 +02:00
3bb24f786d Update dependency opencv-python to ~=4.9.0.80 2023-12-31 15:53:38 +02:00
7adf849150 Merge pull request 'Update dependency fastapi to v0.108.0' (#42) from renovate/fastapi-0.x into dev
Reviewed-on: #42
2023-12-28 19:39:28 +02:00
e6c0a53742 Update dependency fastapi to v0.108.0 2023-12-26 22:33:57 +02:00
fa09dbc9b2 Merge pull request 'Added missing import of SearchLimitInvalidError' (#41) from master into dev
Reviewed-on: #41
2023-12-14 01:22:29 +02:00
c3a9a2f40a Added missing import of SearchLimitInvalidError 2023-12-14 01:22:03 +02:00
58933a9279 Merge pull request 'Fix of a fix in exceptions' (#40) from master into dev
Reviewed-on: #40
2023-12-14 01:21:12 +02:00
bcf74089f9 Fix of a fix in exceptions 2023-12-14 01:20:42 +02:00
891dc81271 Merge pull request 'Merge of the exceptions import fix' (#39) from master into dev
Reviewed-on: #39
2023-12-14 01:10:15 +02:00
25c902c194 Fixed the wrong exceptions being imported 2023-12-14 01:09:04 +02:00
5a794f7dc6 Merge pull request 'Update dependency ujson to ~=5.9.0' (#37) from renovate/ujson-5.x into dev
Reviewed-on: #37
2023-12-12 03:28:49 +02:00
848b2f1a8e Merge pull request 'Update dependency fastapi to v0.105.0' (#38) from renovate/fastapi-0.x into dev
Reviewed-on: #38
2023-12-12 03:28:35 +02:00
539b3b42c9 Update dependency fastapi to v0.105.0 2023-12-12 03:22:45 +02:00
f01d2d177b Update dependency ujson to ~=5.9.0 2023-12-11 01:36:10 +02:00
2 changed files with 19 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ from classes.exceptions import (
AlbumNotFoundError, AlbumNotFoundError,
PhotoNotFoundError, PhotoNotFoundError,
PhotoSearchQueryEmptyError, PhotoSearchQueryEmptyError,
SearchLimitInvalidError,
SearchPageInvalidError, SearchPageInvalidError,
SearchTokenInvalidError, SearchTokenInvalidError,
UserAlreadyExists, UserAlreadyExists,
@@ -95,12 +96,24 @@ async def video_search_query_empty_exception_handler(
) )
@app.exception_handler(SearchLimitInvalidError)
async def search_limit_invalid_exception_handler(
request: Request, exc: SearchLimitInvalidError
):
return UJSONResponse(
status_code=HTTP_400_BAD_REQUEST,
content={
"detail": "Parameter 'limit' must be greater or equal to 1."
},
)
@app.exception_handler(SearchPageInvalidError) @app.exception_handler(SearchPageInvalidError)
async def search_page_invalid_exception_handler( async def search_page_invalid_exception_handler(
request: Request, exc: SearchPageInvalidError request: Request, exc: SearchPageInvalidError
): ):
return UJSONResponse( return UJSONResponse(
status_code=HTTP_400_BAD_REQUEST, status_code=HTTP_401_UNAUTHORIZED,
content={ content={
"detail": "Parameters 'page' and 'page_size' must be greater or equal to 1." "detail": "Parameters 'page' and 'page_size' must be greater or equal to 1."
}, },
@@ -114,7 +127,7 @@ async def search_token_invalid_exception_handler(
return UJSONResponse( return UJSONResponse(
status_code=HTTP_401_UNAUTHORIZED, status_code=HTTP_401_UNAUTHORIZED,
content={ content={
"detail": "Parameters 'page' and 'page_size' must be greater or equal to 1." "detail": "Invalid search token."
}, },
) )

View File

@@ -1,14 +1,14 @@
aiofiles==23.2.1 aiofiles==23.2.1
apscheduler~=3.10.1 apscheduler~=3.10.1
exif==1.6.0 exif==1.6.0
fastapi[all]==0.104.1 fastapi[all]==0.110.2
mongodb-migrations==1.3.0 mongodb-migrations==1.3.0
opencv-python~=4.8.1.78 opencv-python~=4.9.0.80
passlib~=1.7.4 passlib~=1.7.4
pymongo>=4.3.3 pymongo>=4.3.3
python-jose[cryptography]~=3.3.0 python-jose[cryptography]~=3.3.0
python-magic~=0.4.27 python-magic~=0.4.27
scipy~=1.11.0 scipy~=1.13.0
ujson~=5.8.0 ujson~=5.9.0
--extra-index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple --extra-index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple
async_pymongo==0.1.4 async_pymongo==0.1.4