Skip to content

Commit 3bb6a57

Browse files
committed
test
1 parent 3739a0e commit 3bb6a57

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

app/controllers/api/v1/users/sessions_controller.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ def create
99
end
1010

1111
def destroy
12+
# fetch access token from request header
1213
api_token = request.headers["Authorization"]&.split(" ")&.last
13-
14+
# find user's api credentials by access token
1415
api_credential = ApiCredential.find_by(api_token_digest: Digest::SHA256.hexdigest(api_token))
15-
16+
# set api and refresh tokens to nil; otherwise render 401
1617
if api_credential
1718
api_credential.revoke_api_token
1819
api_credential.revoke_refresh_token

app/controllers/volunteers_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def create
3232
authorize @volunteer
3333

3434
if @volunteer.save
35-
35+
# invitation error handling
3636
begin
3737
@volunteer.invite!(current_user)
3838
rescue => e

0 commit comments

Comments
 (0)