You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: devconnect-app/src/app/api/data/README.md
+31-28Lines changed: 31 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
`GET /api/data`
5
5
6
6
## Description
7
-
Fetches supporter and POI (Point of Interest) data from a Notion database. The data is automatically categorized based on the `Is POI`checkbox field.
7
+
Fetches supporter and POI (Point of Interest) data from a Notion database. The data is automatically categorized based on the `POI`select field (previously was boolean `Is POI`).
8
8
9
9
## Response Format
10
10
@@ -15,29 +15,29 @@ Fetches supporter and POI (Point of Interest) data from a Notion database. The d
15
15
"supporters": [
16
16
{
17
17
"name": "Espresso",
18
-
"layerNaming": "l2s/espresso",
19
-
"districtId": 1,
20
-
"locationId": 1
18
+
"layerName": "l2s/espresso",
19
+
"districtId": "1",
20
+
"locationId": "1"
21
21
}
22
22
],
23
23
"pois": [
24
24
{
25
25
"name": "Help desk 1",
26
-
"layerNaming": "arts/help-desk-1",
27
-
"districtId": 3,
28
-
"locationId": 3
26
+
"layerName": "arts/help-desk-1",
27
+
"districtId": "3",
28
+
"locationId": "3"
29
29
}
30
30
],
31
-
"districts": [
32
-
{ "id": 1,"name": "L2s" },
33
-
{ "id": 2,"name": "Social" },
34
-
{ "id": 3,"name": "Hardware & Wallets" }
35
-
],
36
-
"locations": [
37
-
{ "id": 1,"name": "Pista Central" },
38
-
{ "id": 2,"name": "Green Pavilion" },
39
-
{ "id": 3,"name": "Pavilion 9" }
40
-
]
31
+
"districts": {
32
+
"1": {"name": "L2s" },
33
+
"2": {"name": "Social" },
34
+
"3": {"name": "Hardware & Wallets" }
35
+
},
36
+
"locations": {
37
+
"1": {"name": "Pista Central" },
38
+
"2": {"name": "Green Pavilion" },
39
+
"3": {"name": "Pavilion 9" }
40
+
}
41
41
},
42
42
"timestamp": "2025-09-09T17:59:05.480Z"
43
43
}
@@ -46,24 +46,27 @@ Fetches supporter and POI (Point of Interest) data from a Notion database. The d
46
46
## Data Structure
47
47
48
48
### Supporters
49
-
Array of supporter objects where `Is POI` is `false`. Each supporter contains:
49
+
Array of supporter objects where `POI`field is empty. Each supporter contains:
50
50
-`name` (string): Supporter name
51
-
-`layerNaming` (string): Layer naming convention
52
-
-`districtId` (number|null): Reference to districts array ID
53
-
-`locationId` (number|null): Reference to locations array ID
51
+
-`layerName` (string): Layer naming convention
52
+
-`districtId` (string|null): Reference to districts object key
53
+
-`locationId` (string|null): Reference to locations object key
54
54
55
55
### POIs (Points of Interest)
56
-
Array of POI objects where `Is POI`is `true`. Each POI contains the same fields as supporters.
56
+
Array of POI objects where `POI`field has a value. Each POI contains the same fields as supporters.
57
57
58
58
### Districts
59
-
Array of unique district objects with:
60
-
-`id` (number): Sequential ID starting from 1
61
-
-`name` (string): District name
59
+
Object of unique district objects with numeric string keys:
60
+
61
+
- Key (string): Sequential ID starting from "1"
62
+
- Value: Object with `name` (string): District name
62
63
63
64
### Locations
64
-
Array of unique location objects with:
65
-
-`id` (number): Sequential ID starting from 1
66
-
-`name` (string): Location name
65
+
66
+
Object of unique location objects with numeric string keys:
67
+
68
+
- Key (string): Sequential ID starting from "1"
69
+
- Value: Object with `name` (string): Location name
0 commit comments