Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
grippy committed Jun 6, 2024
1 parent 4322642 commit 685194c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/surf/emails_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Api::V1::Surf::EmailsController < Api::BaseController
before_action :current_user

def confirmation
confirmation_params = {:confirmation_token => @current_user.confirmation_token}
confirmation_params = { :confirmation_token => @current_user.confirmation_token }

Check failure on line 10 in app/controllers/api/v1/surf/emails_controller.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Style/HashSyntax: Use the new Ruby 1.9 hash syntax. (https://rubystyle.guide#hash-literals)

Check failure on line 10 in app/controllers/api/v1/surf/emails_controller.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Style/HashSyntax: Use the new Ruby 1.9 hash syntax. (https://rubystyle.guide#hash-literals)
confirmation_url = "/auth/confirmation?#{confirmation_params.to_query}"
render json: {
base_url: request.base_url,
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/api/v1/surf/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ def whoami
# unconfirmed user access and might need to
# get the confirmation_token for sending the email
protected

def require_user!
if !current_user
render json: { error: 'This method requires an authenticated user' }, status: 422
else
if current_user
update_user_sign_in
else
render json: { error: 'This method requires an authenticated user' }, status: 422
end
end
end
2 changes: 1 addition & 1 deletion app/services/surf_app_sign_up_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ def create_user!
@user.skip_confirmation_notification!
@user.save!
end
end
end
5 changes: 4 additions & 1 deletion dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
# Running Apps

From the root of the repo run this the first time:

- `docker-compose -f dev/docker-compose.yml up --build`

Or, if restarting:

- `docker-compose -f dev/docker-compose.yml up`

The app takes a while to start. Patience, my friend.
Expand Down Expand Up @@ -42,6 +44,7 @@ The developer setup doesn't configure SSL and uses nginx as a reverse proxy (see
- `docker-compose -f dev/docker-compose.yml down`

This is helpful if we're making changes to how the docker-compose stuff runs and we want to start fresh:

- `./dev/clean.sh`

# OAuth Client Testing
Expand All @@ -57,4 +60,4 @@ Once you cache the client and or users...

```
./dev/debug/emails.sh
```
```

0 comments on commit 685194c

Please sign in to comment.