File size: 841 Bytes
7781557
 
 
 
 
 
 
 
 
3bb94b1
7781557
 
3bb94b1
 
 
 
 
 
 
 
 
7781557
 
 
 
3bb94b1
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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