Skip to content

Commit

Permalink
Removed unused feature_limit variable
Browse files Browse the repository at this point in the history
  • Loading branch information
JusticeV452 committed Apr 18, 2024
1 parent be691b1 commit 305194e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions backend/app/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_specific_ls_election(request, year, state, constituency_no):


@api_view(['GET'])
def get_SDE_DATA_IN_F7DSTRBND_1991(request, feature_limit=10):
def get_SDE_DATA_IN_F7DSTRBND_1991(request):
"""
API endpoint to get SDE_DATA_IN_F7DSTRBND_1991 geojson
"""
Expand All @@ -93,7 +93,7 @@ def get_SDE_DATA_IN_F7DSTRBND_1991(request, feature_limit=10):


@api_view(['GET'])
def get_India_PC_2019_simplified(request, feature_limit=10):
def get_India_PC_2019_simplified(request):
"""
API endpoint to get SDE_DATA_IN_F7DSTRBND_1991 geojson
"""
Expand All @@ -109,7 +109,7 @@ def get_India_PC_2019_simplified(request, feature_limit=10):


@api_view(['GET'])
def get_India_PC_2019(request, feature_limit=10):
def get_India_PC_2019(request):
"""
API endpoint to get SDE_DATA_IN_F7DSTRBND_1991 geojson
"""
Expand Down
10 changes: 4 additions & 6 deletions backend/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@
path('api/ls-elections/<year>', api_views.get_ls_election_year),
path('api/ls-elections/<year>/<state>/<constituency_no>',
api_views.get_specific_ls_election),
path(
"api/SDE_DATA_IN_F7DSTRBND_1991/<int:feature_limit>",

api_views.get_SDE_DATA_IN_F7DSTRBND_1991
path("api/SDE_DATA_IN_F7DSTRBND_1991/",
api_views.get_SDE_DATA_IN_F7DSTRBND_1991
),
path("api/all-campaign-finance/", api_views.campaign_finance),
path(
Expand All @@ -56,9 +54,9 @@
api_views.campaign_finance_party_subset),
path("api/campaign-finance/all-parties/<donor_name>",
api_views.campaign_finance_donor_subset),
path("api/India_PC_2019_simplified/<int:feature_limit>",
path("api/India_PC_2019_simplified/",
api_views.get_India_PC_2019_simplified),
path("api/India_PC_2019/<int:feature_limit>",
path("api/India_PC_2019/",
api_views.get_India_PC_2019),
path("api/competitiveness_colors/<election_year>",
api_views.get_competitiveness_data),
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/CompetitivenessMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const CompetitivenessMap = () => {
useEffect(() => {
if (mapData) return;
async function getGeojson() {
const mapResponse = await fetch("/api/India_PC_2019/10");
const mapResponse = await fetch("/api/India_PC_2019/");
const result = await mapResponse.json();
setMapData(result);

Expand Down

0 comments on commit 305194e

Please sign in to comment.