correct check of mandatory fields
This commit is contained in:
parent
63d249ded3
commit
a7ddb71ac5
@ -11,7 +11,7 @@ config({"development", "production"}, {
|
||||
})
|
||||
|
||||
config("production", {
|
||||
greeting = "different greeting",
|
||||
greeting = "nothing here yet",
|
||||
postgres = {
|
||||
password = os.getenv('POSTGRES_PASSWORD')
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user