fix(apps.helpers.ts): check folder existense before accesing it
This commit is contained in:
parent
51a75546e1
commit
21cec26e06
1 changed files with 3 additions and 1 deletions
|
@ -164,7 +164,9 @@ export const getAppInfo = (id: string, status?: AppStatusEnum): AppInfo | null =
|
|||
export const getUpdateInfo = async (id: string) => {
|
||||
const app = await App.findOne({ where: { id } });
|
||||
|
||||
if (!app) {
|
||||
const doesFileExist = fileExists(`/repos/${config.APPS_REPO_ID}/apps/${id}`);
|
||||
|
||||
if (!app || !doesFileExist) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue