correct check of mandatory fields

This commit is contained in:
dreamer 2020-10-12 12:36:17 +02:00
parent 63d249ded3
commit a7ddb71ac5
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,7 @@ config({"development", "production"}, {
}) })
config("production", { config("production", {
greeting = "different greeting", greeting = "nothing here yet",
postgres = { postgres = {
password = os.getenv('POSTGRES_PASSWORD') password = os.getenv('POSTGRES_PASSWORD')
} }

View File

@ -40,6 +40,7 @@ function Splhandler(self)
local request_secret = self.params.secret local request_secret = self.params.secret
if station_secret then if station_secret then
if station_secret ~= request_secret then if station_secret ~= request_secret then
print("secrets not matching")
return return
end end
end end
@ -63,7 +64,8 @@ function Splhandler(self)
local airdate = self.params.date -- mandatory local airdate = self.params.date -- mandatory
-- check mandatory fields -- 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 return
end end