Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkweon17 committed Nov 10, 2023
1 parent 22bb379 commit cc8e283
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions app/routers/auth.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
from fastapi import APIRouter, Depends, Response, Request, status
from sqlalchemy.orm import Session
from typing import Annotated

from fastapi import APIRouter, Depends, Response, Request, HTTPException, status
from fastapi.security import HTTPBasic, HTTPBasicCredentials


from database import get_db
# from models import User
from models import HKUser


security = HTTPBasic()

router = APIRouter()

router = APIRouter(previx="/users", tags=["users"], responses={404: {"description": "Not found"}})

# users 핸들러
# @router.get("/")

@app.get("/users/me")
def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
return {"username": credentials.username, "password": credentials.password}

0 comments on commit cc8e283

Please sign in to comment.