diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-03-03 19:50:23 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-03-03 19:50:23 -0600 |
| commit | 8e884fe115839da19977fd3e1005abb21a8883c1 (patch) | |
| tree | 53049df69a6bafd09c1f432ea188696746276851 /src | |
| parent | 96c09450b8ac4e21274ed719653613acd1a618c0 (diff) | |
| download | invidious-8e884fe115839da19977fd3e1005abb21a8883c1.tar.gz invidious-8e884fe115839da19977fd3e1005abb21a8883c1.tar.bz2 invidious-8e884fe115839da19977fd3e1005abb21a8883c1.zip | |
Fix webhook endpoints
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 46009533..8a52253a 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2337,7 +2337,7 @@ get "/feed/webhook" do |env| end ucid = HTTP::Params.parse(URI.parse(topic).query.not_nil!)["channel_id"] - PG_DB.exec("UPDATE channels SET subscribed = true WHERE ucid = $1", ucid) + PG_DB.exec("UPDATE channels SET subscribed = true WHERE id = $1", ucid) halt env, status_code: 200, response: challenge end @@ -2367,6 +2367,8 @@ post "/feed/webhook" do |env| ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \ updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array) end + + halt env, status_code: 200 end # Channels |
