From 21bf9dbc1c1a59e09e8e67fa07b83bd3f24cb254 Mon Sep 17 00:00:00 2001 From: "kirby@puppetlabs.com" Date: Fri, 6 Nov 2020 13:17:52 -0800 Subject: [PATCH] Fix syntax of validate_token in helpers This change fixes an error in validate_token where hset does not have the correct number of parameters. Without this change validate_token causes a error. --- lib/vmpooler/api/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmpooler/api/helpers.rb b/lib/vmpooler/api/helpers.rb index 3c9f487..e4b2302 100644 --- a/lib/vmpooler/api/helpers.rb +++ b/lib/vmpooler/api/helpers.rb @@ -18,7 +18,7 @@ module Vmpooler def validate_token(backend) if valid_token?(backend) - backend.hset("vmpooler__token__#{request.env['HTTP_X_AUTH_TOKEN']}last#{Time.now}") + backend.hset("vmpooler__token__#{request.env['HTTP_X_AUTH_TOKEN']}", 'last', Time.now) return true end