Compare commits
29 Commits
v0.6.0
...
508984442b
Author | SHA1 | Date | |
---|---|---|---|
508984442b | |||
37a6b4634c | |||
5796c6ea40 | |||
b488bbee0a | |||
43597db03c | |||
e6f3b7c4b1 | |||
e91a6ad10e | |||
aa6c5b99b1 | |||
0991734377 | |||
d4aa6558d6 | |||
186fddacef | |||
bf006a0734 | |||
9d70724d64 | |||
8b30afdf6a | |||
0db4661658 | |||
bf4fbe2302 | |||
3bb24f786d | |||
7adf849150 | |||
e6c0a53742 | |||
fa09dbc9b2 | |||
c3a9a2f40a | |||
58933a9279 | |||
bcf74089f9 | |||
891dc81271 | |||
25c902c194 | |||
5a794f7dc6 | |||
848b2f1a8e | |||
539b3b42c9 | |||
f01d2d177b |
@@ -17,6 +17,7 @@ from classes.exceptions import (
|
||||
AlbumNotFoundError,
|
||||
PhotoNotFoundError,
|
||||
PhotoSearchQueryEmptyError,
|
||||
SearchLimitInvalidError,
|
||||
SearchPageInvalidError,
|
||||
SearchTokenInvalidError,
|
||||
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)
|
||||
async def search_page_invalid_exception_handler(
|
||||
request: Request, exc: SearchPageInvalidError
|
||||
):
|
||||
return UJSONResponse(
|
||||
status_code=HTTP_400_BAD_REQUEST,
|
||||
status_code=HTTP_401_UNAUTHORIZED,
|
||||
content={
|
||||
"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(
|
||||
status_code=HTTP_401_UNAUTHORIZED,
|
||||
content={
|
||||
"detail": "Parameters 'page' and 'page_size' must be greater or equal to 1."
|
||||
"detail": "Invalid search token."
|
||||
},
|
||||
)
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
aiofiles==23.2.1
|
||||
apscheduler~=3.10.1
|
||||
exif==1.6.0
|
||||
fastapi[all]==0.104.1
|
||||
fastapi[all]==0.110.2
|
||||
mongodb-migrations==1.3.0
|
||||
opencv-python~=4.8.1.78
|
||||
opencv-python~=4.9.0.80
|
||||
passlib~=1.7.4
|
||||
pymongo>=4.3.3
|
||||
python-jose[cryptography]~=3.3.0
|
||||
python-magic~=0.4.27
|
||||
scipy~=1.11.0
|
||||
ujson~=5.8.0
|
||||
scipy~=1.13.0
|
||||
ujson~=5.9.0
|
||||
--extra-index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple
|
||||
async_pymongo==0.1.4
|
Reference in New Issue
Block a user