Commit 31c5d7cd authored by Cool Fire's avatar Cool Fire

Fix usage of "user" var before it was defined

parent f71c4337
Pipeline #1348 passed with stage
in 2 minutes and 50 seconds
......@@ -25,13 +25,13 @@ class Manager2Api < Sinatra::Base
halt erb :error, locals: { code: 400, message: 'Illegal character in database name' }
end
# Make sure the non-prefix database name is used
dbname = params['dbname'].gsub(/^#{user}_/, '')
data = git_get
user = git_user_from_key(params['key'])
comment = params.key?('comment') ? params['comment'] : ''
# Make sure the non-prefix database name is used
dbname = params['dbname'].gsub(/^#{user}_/, '')
# Check if db does not already exist
if data[user]['properties'].key? 'mysql_dbs'
if data[user]['properties']['mysql_dbs'].key? dbname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment