send (hard coded) authorization token

master
Stefan Haslinger 2022-03-25 09:09:05 +01:00
parent 9e1fc29362
commit 6d422ac2dc
2 changed files with 7 additions and 4 deletions

View File

@ -38,10 +38,13 @@ defmodule Publisher do
defp publish(state) do
result =
:post
|> Finch.build(
Finch.build(
:post,
state.weather_tracker_url,
[{"Content-Type", "application/json"}],
[
{"Content-Type", "application/json"},
{"authorization", "shiqbNfVhL91JZOtqK0896BYJfZbUDrI2ERIzmoc"}
],
Jason.encode!(state.measurements)
)
|> Finch.request(WeatherTrackerClient)

View File

@ -15,6 +15,6 @@ SensorHub is an **IOT-Demo Project Weather Station**
* Create firmware with `mix firmware`
* Burn to an SD card with `mix firmware.burn`
The SD-Card Reader is properly detected.
* Upload to the device with `mix upload`
* Upload to the device with `mix upload hub.local`
for Sensors and Links see the corresponding Wiki pages.