Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Adiciona datasets/ aos endpoints relacionados a bases de dados (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
anapaulagomes authored Sep 10, 2023
1 parent 0d8acdc commit da00373
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions web/api/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GAZZETES_API = "api/gazettes"
CITY_HALL_API = "api/city-hall"
CITY_COUNCIL_API = "api/city-council"
GAZETTES_API = "api/datasets/gazettes"
CITY_HALL_API = "api/datasets/city-hall"
CITY_COUNCIL_API = "api/datasets/city-council"

AVAILABLE_ENDPOINTS_BY_PUBLIC_AGENCY = {
"city-council": {
Expand All @@ -16,7 +16,7 @@
},
{
"friendly_name": "Diário Oficial - Legislativo",
"endpoint": f"{GAZZETES_API}/?power=legislative",
"endpoint": f"{GAZETTES_API}/?power=legislative",
},
{
"friendly_name": "Lista de presença dos vereadores",
Expand All @@ -29,7 +29,7 @@
"endpoints": [
{
"friendly_name": "Diário Oficial - Executivo",
"endpoint": f"{GAZZETES_API}/?power=executive",
"endpoint": f"{GAZETTES_API}/?power=executive",
},
{
"friendly_name": "Licitações",
Expand Down
12 changes: 6 additions & 6 deletions web/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@

router = routers.DefaultRouter()
router.register("", HealthCheckView, basename="root")
router.register("gazettes", GazetteView, basename="gazettes")
router.register("datasets/gazettes", GazetteView, basename="gazettes")


urlpatterns = [
path("", include(router.urls)),
path(
"city-council/agenda/",
"datasets/city-council/agenda/",
CityCouncilAgendaView.as_view(),
name="city-council-agenda",
),
path(
"city-council/attendance-list/",
"datasets/city-council/attendance-list/",
CityCouncilAttendanceListView.as_view(),
name="city-council-attendance-list",
),
path(
"city-council/minute/",
"datasets/city-council/minute/",
CityCouncilMinuteView.as_view(),
name="city-council-minute",
),
path("city-hall/bids/", CityHallBidView.as_view(), name="city-hall-bids"),
path("endpoints", FrontendEndpoint.as_view(), name="frontend-endpoints"),
path("datasets/city-hall/bids/", CityHallBidView.as_view(), name="city-hall-bids"),
path("datasets/endpoints", FrontendEndpoint.as_view(), name="frontend-endpoints"),
]
6 changes: 3 additions & 3 deletions web/api/tests/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GAZZETES_API = "api/gazettes"
CITY_HALL_API = "api/city-hall"
CITY_COUNCIL_API = "api/city-council"
GAZZETES_API = "api/datasets/gazettes"
CITY_HALL_API = "api/datasets/city-hall"
CITY_COUNCIL_API = "api/datasets/city-council"

AVAILABLE_ENDPOINTS_BY_PUBLIC_AGENCY = {
"city-council": {
Expand Down

0 comments on commit da00373

Please sign in to comment.