diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-30 08:54:12 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-30 08:54:12 -0500 |
| commit | 24c79a35541f5be59b4b5aebb9323c4774e8089c (patch) | |
| tree | 890d96ebeaacda271a79659c8015445b3e224d97 /src/invidious.cr | |
| parent | 2e69774b1ffd78e558b5c61b3191b188cee5927d (diff) | |
| download | invidious-24c79a35541f5be59b4b5aebb9323c4774e8089c.tar.gz invidious-24c79a35541f5be59b4b5aebb9323c4774e8089c.tar.bz2 invidious-24c79a35541f5be59b4b5aebb9323c4774e8089c.zip | |
Remove migration breaks for watch history
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index b0df9dc0..c9392c13 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -280,7 +280,7 @@ get "/watch" do |env| user = env.get? "user" if user user = user.as(User) - if user.watched != ["N/A"] && !user.watched.includes? id + if !user.watched.includes? id PG_DB.exec("UPDATE users SET watched = watched || $1 WHERE id = $2", [id], user.id) end @@ -1670,11 +1670,7 @@ post "/login" do |env| sid = Base64.encode(Random::Secure.random_bytes(50)) user = create_user(sid, email, password) - if user.watched = ["N/A"] - user_array = user.to_a[0..-2] - else - user_array = user.to_a - end + user_array = user.to_a user_array[5] = user_array[5].to_json args = arg_array(user_array) |
