diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-20 13:03:06 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-20 13:03:06 +0100 |
commit | b640f35621b419ae9b9e621e00a8a055068ce2f4 (patch) | |
tree | 430d9b5a442a427d07135b96ac0f71fd24d4aa99 /app | |
parent | e14b76c7cb07c3ebc01a17991df9fe5b69d1b5bc (diff) |
Writing out more tests, fixed some bugs
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/api/accounts.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/api/follows.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/api/salmon.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/api/statuses.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/api/subscriptions.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/application.scss | 9 | ||||
-rw-r--r-- | app/assets/stylesheets/oauth/applications.scss | 3 | ||||
-rw-r--r-- | app/controllers/api/subscriptions_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api_controller.rb | 1 | ||||
-rw-r--r-- | app/services/process_feed_service.rb | 2 |
10 files changed, 3 insertions, 29 deletions
diff --git a/app/assets/stylesheets/api/accounts.scss b/app/assets/stylesheets/api/accounts.scss deleted file mode 100644 index 614f23d34..000000000 --- a/app/assets/stylesheets/api/accounts.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the Api::Accounts controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/api/follows.scss b/app/assets/stylesheets/api/follows.scss deleted file mode 100644 index 4da2e7e2c..000000000 --- a/app/assets/stylesheets/api/follows.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the API::Follows controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/api/salmon.scss b/app/assets/stylesheets/api/salmon.scss deleted file mode 100644 index 13cb648a8..000000000 --- a/app/assets/stylesheets/api/salmon.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the API::Salmon controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/api/statuses.scss b/app/assets/stylesheets/api/statuses.scss deleted file mode 100644 index dfa3227d8..000000000 --- a/app/assets/stylesheets/api/statuses.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the API::Statuses controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/api/subscriptions.scss b/app/assets/stylesheets/api/subscriptions.scss deleted file mode 100644 index 9bee8c9bd..000000000 --- a/app/assets/stylesheets/api/subscriptions.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the API::Subscriptions controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 9114acde4..5e89c210b 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,12 +1,3 @@ -$primary-color: #ff7473; -$secondary-color: #ffc952; -$tertiary-color: #47b8e0; -$quaternary-color: #34314c; -$background-color: #fff; -$darker-background-color: #e3dede; -$text-color: #333030; -$lighter-text-color: #8b8687; - @import url(https://fonts.googleapis.com/css?family=Roboto:400,500,400italic); @import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,500); @import "font-awesome"; diff --git a/app/assets/stylesheets/oauth/applications.scss b/app/assets/stylesheets/oauth/applications.scss deleted file mode 100644 index 50933741e..000000000 --- a/app/assets/stylesheets/oauth/applications.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the oauth::applications controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/api/subscriptions_controller.rb b/app/controllers/api/subscriptions_controller.rb index 038d6c877..6ae038a36 100644 --- a/app/controllers/api/subscriptions_controller.rb +++ b/app/controllers/api/subscriptions_controller.rb @@ -12,7 +12,7 @@ class Api::SubscriptionsController < ApiController def update body = request.body.read - if @account.subscription(api_subscription_url(@account.id)).verify(body, env['HTTP_X_HUB_SIGNATURE']) + if @account.subscription(api_subscription_url(@account.id)).verify(body, request.headers['HTTP_X_HUB_SIGNATURE']) ProcessFeedService.new.(body, @account) render nothing: true, status: 201 else diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 80d084328..35f1e62c5 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -1,5 +1,6 @@ class ApiController < ApplicationController protect_from_forgery with: :null_session + skip_before_filter :verify_authenticity_token protected diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 504d58aed..db69dfc6a 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -17,7 +17,7 @@ class ProcessFeedService < BaseService status = Status.find_by(uri: activity_id(entry)) # If we already have a post and the verb is now "delete", we gotta delete it and move on! - if verb(entry) == :delete + if !status.nil? && verb(entry) == :delete delete_post!(status) next end |