Skip to content

Commit 93e3bb0

Browse files
committed
format
1 parent 02d4496 commit 93e3bb0

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/auth/github/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {URL} from "url";
99
const githubAuth = Router()
1010
export = githubAuth
1111

12-
function githubUrl (path) {
12+
function githubUrl(path) {
1313
return config.github.enterpriseURL && new URL(path, config.github.enterpriseURL).toString()
1414
}
1515

lib/auth/oauth2/strategy.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {InternalOAuthError, Strategy} from "passport-oauth2";
22
import config from "../../config";
33

4-
export function parseProfile (data) {
4+
export function parseProfile(data) {
55
const username = extractProfileAttribute(data, config.oauth2.userProfileUsernameAttr)
66
const displayName = extractProfileAttribute(data, config.oauth2.userProfileDisplayNameAttr)
77
const email = extractProfileAttribute(data, config.oauth2.userProfileEmailAttr)
@@ -20,7 +20,7 @@ export function parseProfile (data) {
2020
}
2121
}
2222

23-
export function extractProfileAttribute (data, path) {
23+
export function extractProfileAttribute(data, path) {
2424
if (!data) return undefined
2525
if (typeof path !== 'string') return undefined
2626
// can handle stuff like `attrs[0].name`
@@ -41,15 +41,16 @@ export function extractProfileAttribute (data, path) {
4141

4242
export class OAuth2CustomStrategy extends Strategy {
4343
private _userProfileURL: any;
44-
constructor (options, verify) {
44+
45+
constructor(options, verify) {
4546
options.customHeaders = options.customHeaders || {}
4647
super(options, verify)
4748
this.name = 'oauth2'
4849
this._userProfileURL = options.userProfileURL
4950
this._oauth2.useAuthorizationHeaderforGET(true)
5051
}
5152

52-
userProfile (accessToken, done) {
53+
userProfile(accessToken, done) {
5354
this._oauth2.get(this._userProfileURL, accessToken, function (err, body, res) {
5455
if (err) {
5556
return done(new InternalOAuthError('Failed to fetch user profile', err))

lib/models/revision.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class Revision extends Model<RevisionAttributes> implements RevisionAttri
7171
length: number;
7272
patch: string;
7373

74-
public readonly createdAt ?:number
74+
public readonly createdAt ?: number
7575

7676
static initialize(sequelize: MySequelize): void {
7777
Revision.init({

0 commit comments

Comments
 (0)