chore: suit eslint rules
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { URLSearchParams } from 'url';
|
||||
import DiscordApi from 'discord.js';
|
||||
import axios, { AxiosInstance } from 'axios';
|
||||
import App from '../../models/app';
|
||||
import Field from '../../types/field';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { google, google as GoogleApi } from 'googleapis';
|
||||
import { google as GoogleApi } from 'googleapis';
|
||||
import App from '../../models/app';
|
||||
import Field from '../../types/field';
|
||||
|
||||
|
@@ -16,11 +16,11 @@ export default class Authentication {
|
||||
this.appData = App.findOneByKey('github');
|
||||
}
|
||||
|
||||
get oauthRedirectUrl() {
|
||||
get oauthRedirectUrl(): string {
|
||||
return this.appData.fields.find((field: Field) => field.key == 'oAuthRedirectUrl').value;
|
||||
}
|
||||
|
||||
async createAuthData() {
|
||||
async createAuthData(): { url: string } {
|
||||
const { url } = await getWebFlowAuthorizationUrl({
|
||||
clientType: "oauth-app",
|
||||
clientId: this.connectionData.consumerKey,
|
||||
@@ -33,8 +33,8 @@ export default class Authentication {
|
||||
};
|
||||
}
|
||||
|
||||
async verifyCredentials() {
|
||||
const { data, authentication } = await exchangeWebFlowCode({
|
||||
async verifyCredentials(): any {
|
||||
const { data } = await exchangeWebFlowCode({
|
||||
clientType: "oauth-app",
|
||||
clientId: this.connectionData.consumerKey,
|
||||
clientSecret: this.connectionData.consumerSecret,
|
||||
@@ -65,7 +65,7 @@ export default class Authentication {
|
||||
});
|
||||
}
|
||||
|
||||
async isStillVerified() {
|
||||
async isStillVerified(): boolean {
|
||||
try {
|
||||
await this.getTokenInfo();
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import TwitchApi, { ApiVersions } from 'twitch-js';
|
||||
import TwitchApi from 'twitch-js';
|
||||
import fetchUtil from 'twitch-js/lib/utils/fetch';
|
||||
import App from '../../models/app';
|
||||
import Field from '../../types/field';
|
||||
|
Reference in New Issue
Block a user