correct check of mandatory fields

This commit is contained in:
dreamer 2020-10-12 12:36:17 +02:00
parent 63d249ded3
commit ac99f7d2fa

View File

@ -40,6 +40,7 @@ function Splhandler(self)
local request_secret = self.params.secret
if station_secret then
if station_secret ~= request_secret then
print("secrets not matching")
return
end
end
@ -63,7 +64,8 @@ function Splhandler(self)
local airdate = self.params.date -- mandatory
-- check mandatory fields
if not artist_name or track_name or airtime or airdate then
if not artist_name or not track_name or not airtime or not airdate then
print("missing mandatory field")
return
end