style: auto format whole project

This commit is contained in:
Ali BARIN
2022-11-05 23:57:33 +01:00
parent e338770e57
commit 475f24f661
199 changed files with 2421 additions and 1839 deletions

View File

@@ -1,5 +1,3 @@
import sendMessageToChannel from "./send-message-to-channel";
import sendMessageToChannel from './send-message-to-channel';
export default [
sendMessageToChannel
];
export default [sendMessageToChannel];

View File

@@ -17,12 +17,12 @@ export default async function createAuthData($: IGlobalVariable) {
scope: scopes.join(' '),
});
const url = `${$.app.apiBaseUrl}/oauth2/authorize?${searchParams.toString()}`;
const url = `${
$.app.apiBaseUrl
}/oauth2/authorize?${searchParams.toString()}`;
await $.auth.set({ url });
} catch (error) {
throw new Error(
`Error occured while verifying credentials: ${error}`
);
throw new Error(`Error occured while verifying credentials: ${error}`);
}
}

View File

@@ -12,9 +12,10 @@ export default {
readOnly: true,
value: '{WEB_APP_URL}/app/discord/connections/add',
placeholder: null,
description: 'When asked to input an OAuth callback or redirect URL in Discord OAuth, enter the URL above.',
description:
'When asked to input an OAuth callback or redirect URL in Discord OAuth, enter the URL above.',
docUrl: 'https://automatisch.io/docs/discord#oauth-redirect-url',
clickToCopy: true
clickToCopy: true,
},
{
key: 'consumerKey',
@@ -26,7 +27,7 @@ export default {
placeholder: null,
description: null,
docUrl: 'https://automatisch.io/docs/discord#consumer-key',
clickToCopy: false
clickToCopy: false,
},
{
key: 'consumerSecret',
@@ -38,7 +39,7 @@ export default {
placeholder: null,
description: null,
docUrl: 'https://automatisch.io/docs/discord#consumer-secret',
clickToCopy: false
clickToCopy: false,
},
{
key: 'botToken',
@@ -50,8 +51,8 @@ export default {
placeholder: null,
description: null,
docUrl: 'https://automatisch.io/docs/discord#bot-token',
clickToCopy: false
}
clickToCopy: false,
},
],
authenticationSteps: [
{
@@ -60,7 +61,7 @@ export default {
arguments: [
{
name: 'key',
value: '{key}'
value: '{key}',
},
{
name: 'formattedData',
@@ -68,19 +69,19 @@ export default {
properties: [
{
name: 'consumerKey',
value: '{fields.consumerKey}'
value: '{fields.consumerKey}',
},
{
name: 'consumerSecret',
value: '{fields.consumerSecret}'
value: '{fields.consumerSecret}',
},
{
name: 'botToken',
value: '{fields.botToken}'
}
]
}
]
value: '{fields.botToken}',
},
],
},
],
},
{
type: 'mutation' as const,
@@ -88,9 +89,9 @@ export default {
arguments: [
{
name: 'id',
value: '{createConnection.id}'
}
]
value: '{createConnection.id}',
},
],
},
{
type: 'openWithPopup' as const,
@@ -98,9 +99,9 @@ export default {
arguments: [
{
name: 'url',
value: '{createAuthData.url}'
}
]
value: '{createAuthData.url}',
},
],
},
{
type: 'mutation' as const,
@@ -108,7 +109,7 @@ export default {
arguments: [
{
name: 'id',
value: '{createConnection.id}'
value: '{createConnection.id}',
},
{
name: 'formattedData',
@@ -116,11 +117,11 @@ export default {
properties: [
{
name: 'oauthVerifier',
value: '{openAuthPopup.code}'
}
]
}
]
value: '{openAuthPopup.code}',
},
],
},
],
},
{
type: 'mutation' as const,
@@ -128,10 +129,10 @@ export default {
arguments: [
{
name: 'id',
value: '{createConnection.id}'
}
]
}
value: '{createConnection.id}',
},
],
},
],
createAuthData,

View File

@@ -28,10 +28,7 @@ const verifyCredentials = async ($: IGlobalVariable) => {
expires_in: expiresIn,
scope: scope,
token_type: tokenType,
guild: {
id: guildId,
name: guildName,
}
guild: { id: guildId, name: guildName },
} = verifiedCredentials;
await $.auth.set({
@@ -40,7 +37,7 @@ const verifyCredentials = async ($: IGlobalVariable) => {
expiresIn,
scope,
tokenType,
})
});
const user = await getCurrentUser($);

View File

@@ -1,5 +1,3 @@
import listChannels from "./list-channels";
import listChannels from './list-channels';
export default [
listChannels,
];
export default [listChannels];

View File

@@ -13,7 +13,9 @@ export default {
error: null,
};
const response = await $.http.get(`/guilds/${$.auth.data.guildId}/channels`);
const response = await $.http.get(
`/guilds/${$.auth.data.guildId}/channels`
);
channels.data = response.data
.filter((channel: IJSONObject) => {