Merge app and frontend #3

Merged
IgorVolochay merged 32 commits from app into frontend 2026-09-01 09:00:36 +00:00
2 changed files with 5 additions and 15 deletions
Showing only changes of commit 130c1c7d5f - Show all commits
+5 -5
View File
@@ -39,12 +39,12 @@ jobs:
pytest:
runs-on: ubuntu-latest
env:
MONGO_HOST: ${{ secrets.MONGO_HOST }}
MONGO_PORT: ${{ secrets.MONGO_PORT }}
MONGO_HOST: "127.0.0.1"
MONGO_PORT: ${{ secrets.MONGO_PORT || '27017' }}
MONGO_USER: ${{ secrets.MONGO_USER }}
MONGO_PASS: ${{ secrets.MONGO_PASS }}
RABBIT_HOST: ${{ secrets.RABBIT_HOST }}
RABBIT_PORT: ${{ secrets.RABBIT_PORT }}
RABBIT_HOST: "127.0.0.1"
RABBIT_PORT: ${{ secrets.RABBIT_PORT || '5672' }}
RABBIT_USER: ${{ secrets.RABBIT_USER }}
RABBIT_PASS: ${{ secrets.RABBIT_PASS }}
steps:
@@ -61,7 +61,7 @@ jobs:
- name: Start MongoDB
run: |
docker run -d --name mongodb \
-p 27017:27017 \
-p "${MONGO_PORT}:27017" \
-e "MONGO_INITDB_ROOT_USERNAME=${MONGO_USER}" \
-e "MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASS}" \
mongodb/mongodb-community-server
-10
View File
@@ -96,7 +96,6 @@ async def check_user(
result = await mongo.check_user(user_id)
return BaseResponse(result=result)
@app.get("/get_user", status_code=200)
async def get_user(
user_id: int,
@@ -108,7 +107,6 @@ async def get_user(
response.status_code = status.HTTP_404_NOT_FOUND
return BaseResponse(result="User doesn't exist", error=True)
@app.post("/add_user", status_code=201)
@guard_deco.rate_limit(requests=3, window=60)
async def add_user(
@@ -139,8 +137,6 @@ async def get_card(
response.status_code = status.HTTP_404_NOT_FOUND
return BaseResponse(result="There is no card with this card_id", error=True)
@app.get("/get_random_cards", status_code=200)
@guard_deco.rate_limit(requests=5, window=60)
async def get_random_cards(
@@ -161,7 +157,6 @@ async def get_random_cards(
return BaseResponse(result=random_cards)
@app.post("/add_card", status_code=201)
@guard_deco.rate_limit(requests=3, window=60)
async def add_card(
@@ -179,7 +174,6 @@ async def add_card(
response.status_code = status.HTTP_400_BAD_REQUEST
return BaseResponse(result="Card has not passed base moderation", error=True)
@app.patch("/card_accept", status_code=200, dependencies=[Depends(verify_moderation_secret)])
async def card_accept(
card_id: int,
@@ -190,7 +184,6 @@ async def card_accept(
response.status_code = status.HTTP_404_NOT_FOUND
return result
@app.patch("/card_reject", status_code=200, dependencies=[Depends(verify_moderation_secret)])
async def card_reject(
card_id: int,
@@ -201,7 +194,6 @@ async def card_reject(
response.status_code = status.HTTP_404_NOT_FOUND
return result
@app.patch("/select_choice", status_code=200)
async def select_choice(
choice_data: SelectChoice,
@@ -235,7 +227,6 @@ async def like_card(
response.status_code = status.HTTP_404_NOT_FOUND
return result
@app.patch("/dislike_card", status_code=200)
async def dislike_card(
dislike_data: ReactionCard,
@@ -247,7 +238,6 @@ async def dislike_card(
response.status_code = status.HTTP_404_NOT_FOUND
return result
@app.post("/comment", status_code=201)
@guard_deco.rate_limit(requests=5, window=20)
async def comment(