fix: Integration and auth problems wrt slack and twitter

This commit is contained in:
Faruk AYDIN
2022-10-07 16:05:13 +03:00
parent 2862953136
commit 11ef2ac4bc
8 changed files with 104 additions and 90 deletions

View File

@@ -10,16 +10,14 @@ class App {
// Temporaryly restrict the apps we expose until
// their actions/triggers are implemented!
static temporaryList = [
'slack',
'twitter',
'scheduler'
];
static temporaryList = ['slack', 'twitter', 'scheduler'];
static async findAll(name?: string, stripFuncs = true): Promise<IApp[]> {
if (!name)
return Promise.all(
this.temporaryList.map(async (name) => await this.findOneByName(name, stripFuncs))
this.temporaryList.map(
async (name) => await this.findOneByName(name, stripFuncs)
)
);
return Promise.all(
@@ -32,16 +30,12 @@ class App {
static async findOneByName(name: string, stripFuncs = false): Promise<IApp> {
const rawAppData = await getApp(name.toLocaleLowerCase(), stripFuncs);
if (!stripFuncs) return rawAppData;
return appInfoConverter(rawAppData);
}
static async findOneByKey(key: string, stripFuncs = false): Promise<IApp> {
const rawAppData = await getApp(key, stripFuncs);
if (!stripFuncs) return rawAppData;
return appInfoConverter(rawAppData);
}
}