Skip to content

Commit

Permalink
Merge pull request #85 from w1tnessbtwwwww/backend
Browse files Browse the repository at this point in the history
hotfix confirm
  • Loading branch information
w1tnessbtwwwww authored Jan 27, 2025
2 parents 459e9c8 + dba21c1 commit 42c01f8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def process_verification(self, userId: str, verification_code: str) -> Res


async def confirm_email(self, userId: str, code: str) -> Result[None]:
logger.info(str(datetime.datetime.now()))
logger.info(str(datetime.now(datetime.timezone.utc)))
try:
query = (
select(self.model)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from app.utils.verify_codes_generator.code_generator import generate_confirmation_code

from app.security.jwttype import JWTType
from app.security.jwtmanager import JWTManager, oauth2_scheme
from app.security.jwtmanager import JWTManager, get_current_user, oauth2_scheme
from app.security.jwtmanager import oauth2_scheme

from app.exc.bad_email import BadEmail
Expand All @@ -40,6 +40,7 @@ async def register(registerRequest: RegisterRequest, session: AsyncSession = Dep

@auth_router.post("/authorize")
async def authorize(username: str = Form(), password: str = Form(), session: AsyncSession = Depends(get_session)):

user = await UserRepository(session).get_by_filter_one(email=username)
if not user:
raise HTTPException(status_code=401, detail="Пользователь не найден")
Expand All @@ -54,7 +55,6 @@ async def authorize(username: str = Form(), password: str = Form(), session: Asy
access_token=access_token,
refresh_token=refresh_token,
token_type="Bearer"

)


Expand Down
23 changes: 23 additions & 0 deletions SpeedSolverBackend/SpeedSolverAPI/app/routing/cicd_router.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from fastapi import APIRouter


cicd_router = APIRouter(
prefix="/cicd",
tags=["CICD"]
)

@cicd_router.put("/update")
async def update_cicd():
...

@cicd_router.get("/get")
async def get_cicd():
...

@cicd_router.delete("/delete")
async def delete_cicd():
...

@cicd_router.patch("/patch")
async def patch_cicd():
...
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def create_team(createRequest: CreateTeam, user: User = Depends(get_curren
return creating.value

@team_router.put("/update")
async def update_team(team_id: str,updateRequest: UpdateTeam, user: User = Depends(get_current_user), session: AsyncSession = Depends(get_session)):
async def update_team(team_id: str, updateRequest: UpdateTeam, user: User = Depends(get_current_user), session: AsyncSession = Depends(get_session)):
updating = await TeamService(session).update_team(updateRequest, user.userId, team_id)
if not updating.success:
raise HTTPException(status_code=400, detail=updating.error)
Expand Down

0 comments on commit 42c01f8

Please sign in to comment.