fix: dashboard error
This commit is contained in:
@@ -17,7 +17,7 @@ import { day } from './dayjs';
|
||||
import { saveBuildLog } from './buildPacks/common';
|
||||
import { scheduler } from './scheduler';
|
||||
|
||||
export const version = '3.11.6';
|
||||
export const version = '3.11.7';
|
||||
export const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
const algorithm = 'aes-256-ctr';
|
||||
|
@@ -2,11 +2,16 @@ import { isDev } from "./common";
|
||||
import fs from 'fs/promises';
|
||||
export async function getTemplates() {
|
||||
const templatePath = isDev ? './templates.json' : '/app/templates.json';
|
||||
const ts = await fs.readFile(templatePath, 'utf8')
|
||||
if (ts) {
|
||||
return JSON.parse(ts);
|
||||
const open = await fs.open(templatePath, 'r');
|
||||
let data;
|
||||
try {
|
||||
data = await open.readFile({ encoding: 'utf-8' });
|
||||
return JSON.parse(data);
|
||||
} catch (error) {
|
||||
return []
|
||||
} finally {
|
||||
await open?.close()
|
||||
}
|
||||
return [];
|
||||
}
|
||||
const compareSemanticVersions = (a: string, b: string) => {
|
||||
const a1 = a.split('.');
|
||||
|
@@ -34,7 +34,6 @@ export async function startService(request: FastifyRequest<ServiceStartStop>, fa
|
||||
const { id } = request.params;
|
||||
const teamId = request.user.teamId;
|
||||
const service = await getServiceFromDB({ id, teamId });
|
||||
console.log({service})
|
||||
const arm = isARM(service.arch);
|
||||
const { type, destinationDockerId, destinationDocker, persistentStorage, exposePort } =
|
||||
service;
|
||||
|
Reference in New Issue
Block a user