mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-30 02:32:56 +05:30
Add fix for user array
This commit is contained in:
parent
52cad8d6da
commit
f1820ffaf7
@ -1028,7 +1028,7 @@ post "/login" do |env|
|
|||||||
user, sid = create_user(sid, email, password)
|
user, sid = create_user(sid, email, password)
|
||||||
user_array = user.to_a
|
user_array = user.to_a
|
||||||
|
|
||||||
user_array[5] = user_array[5].to_json
|
user_array[4] = user_array[4].to_json
|
||||||
args = arg_array(user_array)
|
args = arg_array(user_array)
|
||||||
|
|
||||||
PG_DB.exec("INSERT INTO users VALUES (#{args})", user_array)
|
PG_DB.exec("INSERT INTO users VALUES (#{args})", user_array)
|
||||||
|
@ -132,7 +132,7 @@ def get_user(sid, headers, db, refresh = true)
|
|||||||
user, sid = fetch_user(sid, headers, db)
|
user, sid = fetch_user(sid, headers, db)
|
||||||
user_array = user.to_a
|
user_array = user.to_a
|
||||||
|
|
||||||
user_array[5] = user_array[5].to_json
|
user_array[4] = user_array[4].to_json
|
||||||
args = arg_array(user_array)
|
args = arg_array(user_array)
|
||||||
|
|
||||||
db.exec("INSERT INTO users VALUES (#{args}) \
|
db.exec("INSERT INTO users VALUES (#{args}) \
|
||||||
@ -154,7 +154,7 @@ def get_user(sid, headers, db, refresh = true)
|
|||||||
user, sid = fetch_user(sid, headers, db)
|
user, sid = fetch_user(sid, headers, db)
|
||||||
user_array = user.to_a
|
user_array = user.to_a
|
||||||
|
|
||||||
user_array[5] = user_array[5].to_json
|
user_array[4] = user_array[4].to_json
|
||||||
args = arg_array(user.to_a)
|
args = arg_array(user.to_a)
|
||||||
|
|
||||||
db.exec("INSERT INTO users VALUES (#{args}) \
|
db.exec("INSERT INTO users VALUES (#{args}) \
|
||||||
|
Loading…
Reference in New Issue
Block a user