Skip to content

Commit

Permalink
finish map refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
jnnchi committed Nov 13, 2024
1 parent acecb04 commit a0f5e14
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
20 changes: 0 additions & 20 deletions backend/map/urls.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
from django.urls import path
from .views import (
get_weekly_green_transactions,
get_weekly_carbon_score,
get_monthly_green_transactions,
get_monthly_carbon_score,
get_total_green_transactions,
get_top_companies,
get_total_co2_score,
get_company_tiers,
get_co2_score_change,
get_green_transaction_change,
get_map_data
)


urlpatterns = [
path('get_weekly_green_transactions/', get_weekly_green_transactions, name='get_weekly_green_transactions'),
path('get_weekly_carbon_score/', get_weekly_carbon_score, name='get_weekly_carbon_score'),
path('get_monthly_green_transactions/', get_monthly_green_transactions, name='get_monthly_green_transactions'),
path('get_monthly_carbon_score/', get_monthly_carbon_score, name='get_monthly_carbon_score'),
path('get_total_green_transactions/', get_total_green_transactions, name='get_total_green_transactions'),
path('get_top_5_companies/', get_top_companies, name='get_top_companies'),
path('get_total_co2_score/', get_total_co2_score, name='get_total_co2_score'),
path('get_company_tiers/', get_company_tiers, name='get_company_tiers'),
path('get_co2_score_change/', get_co2_score_change, name='get_co2_score_change'),
path('get_green_transaction_change/', get_green_transaction_change, name='get_green_transaction_change'),
path('get_map_data/', get_map_data, name='get_map_data')
]
2 changes: 0 additions & 2 deletions backend/map/use_cases.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from utils.firebase import db
from utils.data_access import get_table_from_firebase
from static_file.company_esg_score import company_name_matching, get_company_score
from static_file.map import get_all_locations_and_company
from datetime import date

# Note that get_map is not needed here beacuse it can be imported from static.get_user_all_locations_and_company

Expand Down
1 change: 1 addition & 0 deletions backend/map/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from rest_framework.response import Response

from .use_cases import (
get_user_all_locations_and_company
# Note that get_map_data is not imported here because it is from the static_file/map.py file
Expand Down

0 comments on commit a0f5e14

Please sign in to comment.