lint
This commit is contained in:
parent
6b6fba9393
commit
b5340c20d8
|
@ -3,7 +3,7 @@ import { doWithDB, DocumentType } from "../db"
|
||||||
import { Database, App } from "@budibase/types"
|
import { Database, App } from "@budibase/types"
|
||||||
|
|
||||||
export enum AppState {
|
export enum AppState {
|
||||||
INVALID = "invalid"
|
INVALID = "invalid",
|
||||||
}
|
}
|
||||||
const EXPIRY_SECONDS = 3600
|
const EXPIRY_SECONDS = 3600
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,9 @@ export async function getAllApps({
|
||||||
const response = await Promise.allSettled(appPromises)
|
const response = await Promise.allSettled(appPromises)
|
||||||
const apps = response
|
const apps = response
|
||||||
.filter(
|
.filter(
|
||||||
(result: any) => result.status === "fulfilled" && result.value?.state !== AppState.INVALID
|
(result: any) =>
|
||||||
|
result.status === "fulfilled" &&
|
||||||
|
result.value?.state !== AppState.INVALID
|
||||||
)
|
)
|
||||||
.map(({ value }: any) => value)
|
.map(({ value }: any) => value)
|
||||||
if (!all) {
|
if (!all) {
|
||||||
|
@ -126,7 +128,11 @@ export async function getAppsByIDs(appIds: string[]) {
|
||||||
)
|
)
|
||||||
// have to list the apps which exist, some may have been deleted
|
// have to list the apps which exist, some may have been deleted
|
||||||
return settled
|
return settled
|
||||||
.filter(promise => promise.status === "fulfilled" && promise.value?.state !== AppState.INVALID)
|
.filter(
|
||||||
|
promise =>
|
||||||
|
promise.status === "fulfilled" &&
|
||||||
|
promise.value?.state !== AppState.INVALID
|
||||||
|
)
|
||||||
.map(promise => (promise as PromiseFulfilledResult<App>).value)
|
.map(promise => (promise as PromiseFulfilledResult<App>).value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue