refactor(slack): move scopes out of function definition

This commit is contained in:
Ali BARIN
2022-11-03 18:01:35 +01:00
parent ff76e37efc
commit 2ffce75056

View File

@@ -1,7 +1,6 @@
import { IField, IGlobalVariable } from '@automatisch/types'; import { IField, IGlobalVariable } from '@automatisch/types';
import qs from 'qs'; import qs from 'qs';
export default async function createAuthData($: IGlobalVariable) {
const scopes = [ const scopes = [
'channels:manage', 'channels:manage',
'channels:read', 'channels:read',
@@ -42,6 +41,8 @@ export default async function createAuthData($: IGlobalVariable) {
'users:read', 'users:read',
'users:read.email', 'users:read.email',
]; ];
export default async function createAuthData($: IGlobalVariable) {
const oauthRedirectUrlField = $.app.auth.fields.find( const oauthRedirectUrlField = $.app.auth.fields.find(
(field: IField) => field.key == 'oAuthRedirectUrl' (field: IField) => field.key == 'oAuthRedirectUrl'
); );