Skip to content

Commit

Permalink
fix: rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
martintomas committed Dec 25, 2024
1 parent 8ff150f commit 554e84c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/backend_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
BACKEND_URL: http://localhost:4000/sub-path/backend
FRONTEND_URL: http://localhost:4000/sub-path
FRONTEND_API_SECRET: SECRET
SECRET_KEY_BASE: SECRET

services:
postgres:
Expand Down
3 changes: 2 additions & 1 deletion backend/app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def admin_rights
can %i[update], Admin, id: @admin.id
end

def member_rights; end
def member_rights
end

def default_rights
# enums
Expand Down
2 changes: 1 addition & 1 deletion backend/app/services/jwt_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def self.decode(token)

payload = JWT.decode(token, SECRET, true, {algorithm: ALGORITHM}).first
Member.find payload["member_id"]
rescue JWT::ExpiredSignature, JWT::VerificationError, ActiveRecord::RecordNotFound
rescue JWT::DecodeError, ActiveRecord::RecordNotFound
nil
end
end

0 comments on commit 554e84c

Please sign in to comment.