Compare commits

...

2 commits

Author SHA1 Message Date
f
833307d9e6 container 2022-03-12 16:02:39 -03:00
f
b766d37631 guardar la firma 2022-03-12 16:00:09 -03:00
2 changed files with 6 additions and 2 deletions

View file

@ -15,7 +15,11 @@ pipeline:
when: when:
branch: antifascista branch: antifascista
event: push event: push
path: Dockerfile path:
include:
- ./Dockerfile
- ./.woodpecker.yml
ignore_message: '[all]'
matrix: matrix:
ALPINE_VERSION: ALPINE_VERSION:
- 3.13.6 - 3.13.6

View file

@ -15,7 +15,7 @@ class ReadingsController < ActionController::API
reading = raspberry.readings.build reading_params reading = raspberry.readings.build reading_params
reading.id = params[:transaction_uuid] reading.id = params[:transaction_uuid]
# TODO: Verificar firma # TODO: Verificar firma
reading.signature = headers[:'X-Signature'] reading.signature = request.headers[:'X-Signature']
params[:arduinos]&.each do |a| params[:arduinos]&.each do |a|
arduino = reading.arduinos.build local_id: a[:id], raspberry: raspberry arduino = reading.arduinos.build local_id: a[:id], raspberry: raspberry