UTDallasEPICS / utd-oos-bottle-counter

2 stars 1 forks source link

Create APIs for Arduino #45

Closed AmmarMohammed01 closed 5 months ago

AmmarMohammed01 commented 5 months ago

Feature Description Create API code that will be called by the Arduino. Whenever the fountain detects that one bottle has been saved, call the increment API.

Requirements The increment API should be a POST request. In the URL, the Arduino should pass its own ID. After the API knows the ID, it will find the corresponding fountain in the database and increment its bottle counter value.

AmmarMohammed01 commented 5 months ago

Used a GET request with ability to pass ID parameters /api/arduino/increment/[id]/route.ts