salesiq / backend /app /db /database.py
richlai's picture
added new UI, added form, added api message
3bb94b1
raw
history blame
841 Bytes
import os
from dotenv import load_dotenv
load_dotenv()
db_type = os.getenv("DB_TYPE")
if db_type == "mongodb":
from .database_mongodb import get_user_by_username, create_user, save_file, get_user_files, create_opportunity, get_opportunities, get_opportunity_count
else:
from .database_dynamodb import get_user_by_username, create_user, save_file, get_user_files
async def create_opportunity(opportunity):
"""Dummy function that does nothing"""
return None
async def get_opportunities(username: str):
"""Dummy function that returns empty list"""
return []
async def get_opportunity_count(username: str):
"""Dummy function that returns 0"""
return 0
get_user_by_username
create_user
save_file
get_user_files
create_opportunity
get_opportunities
get_opportunity_count