Skip to content

Commit

Permalink
Eliminate snake_case in variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
microtherion committed Apr 1, 2020
1 parent 135e33d commit 6c496cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Imperial/Helpers/Sessions+Imperial.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ extension Session {
if self[Keys.token] == nil {
throw Abort(.unauthorized, reason: "User currently not authenticated")
} else {
let oauth_data = self["access_token_service"]?.data(using: .utf8) ?? Data()
let oauth = try? JSONSerialization.jsonObject(with: oauth_data, options: [])
let oauth_name = (oauth as? NSDictionary)?["name"] ?? "???"
throw Abort(.methodNotAllowed, reason: "OAuth provider '\(oauth_name)' uses no refresh tokens")
let oauthData = self["access_token_service"]?.data(using: .utf8) ?? Data()
let oauth = try? JSONSerialization.jsonObject(with: oauthData, options: [])
let oauthName = (oauth as? NSDictionary)?["name"] ?? "???"
throw Abort(.methodNotAllowed, reason: "OAuth provider '\(oauthName)' uses no refresh tokens")
}
}
return token
Expand Down

0 comments on commit 6c496cc

Please sign in to comment.