chore: clean up

pull/12/head
Cullen Watson 2023-08-19 18:46:03 -05:00
parent 5701826399
commit f31246ee64
8 changed files with 8 additions and 7 deletions

View File

@ -4,7 +4,6 @@ from .v1 import router as v1_router
router = APIRouter(
prefix="/api",
tags=["api"],
)
router.include_router(v1_router)
router.include_router(auth_router)

View File

@ -3,6 +3,6 @@ from fastapi import APIRouter
from api.auth.token import router as token_router
from api.auth.register import router as register_router
router = APIRouter(prefix="/auth")
router = APIRouter(prefix="/auth", tags=["auth"])
router.include_router(token_router)
router.include_router(register_router)

View File

@ -2,7 +2,7 @@ from fastapi import APIRouter, HTTPException, status
from api.core.users import UserCreate, UserInDB
from api.auth.db_utils import get_user, get_password_hash, create_user
router = APIRouter(prefix="/register", tags=["register"])
router = APIRouter(prefix="/register")
@router.post("/", response_model=dict)

View File

@ -5,7 +5,7 @@ from api.core.users import Token
from api.auth.db_utils import authenticate_user
from api.auth.auth_utils import create_access_token
router = APIRouter(prefix="/token", tags=["token"])
router = APIRouter(prefix="/token")
@router.post("/", response_model=Token)

View File

@ -55,6 +55,8 @@ class LinkedInScraper(Scraper):
"f_AL": "true" if scraper_input.easy_apply else None,
}
params = {k: v for k, v in params.items() if v is not None}
print(params)
response = session.get(self.url, params=params, allow_redirects=True)
if response.status_code != status.HTTP_200_OK:

View File

@ -5,7 +5,7 @@ from api.core.scrapers.ziprecruiter import ZipRecruiterScraper
from api.core.scrapers.linkedin import LinkedInScraper
from api.core.scrapers import ScraperInput, Site, JobResponse
router = APIRouter(prefix="/jobs")
router = APIRouter(prefix="/jobs", tags=["jobs"])
SCRAPER_MAPPING = {
Site.LINKEDIN: LinkedInScraper,

View File

@ -5,7 +5,7 @@ from api import router as api_router
app = FastAPI(
title="JobSpy Backend",
description="Endpoints for job board scrapers",
description="Endpoints for job boardLinkedIn, Indeed, and ZipRecruiterscrapers",
version="1.0.0",
)
app.include_router(api_router)

View File

@ -6,4 +6,4 @@ SUPABASE_URL = os.environ.get("SUPABASE_URL")
SUPABASE_KEY = os.environ.get("SUPABASE_KEY")
JWT_SECRET_KEY = os.environ.get("JWT_SECRET_KEY")
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 3600
ACCESS_TOKEN_EXPIRE_MINUTES = 60