Contribution guide + code refactor + package updates
This commit is contained in:
@@ -5,7 +5,7 @@ import compare from 'compare-versions';
|
||||
import cuid from 'cuid';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import { asyncExecShell, asyncSleep, cleanupDockerStorage, errorHandler, isDev, listSettings, prisma, uniqueName, version } from '../../../lib/common';
|
||||
|
||||
import { supportedServiceTypesAndVersions } from '../../../lib/services/supportedVersions';
|
||||
import type { FastifyReply, FastifyRequest } from 'fastify';
|
||||
import type { Login, Update } from '.';
|
||||
import type { GetCurrentUser } from './types';
|
||||
@@ -300,6 +300,7 @@ export async function getCurrentUser(request: FastifyRequest<GetCurrentUser>, fa
|
||||
}
|
||||
return {
|
||||
settings: await prisma.setting.findFirst(),
|
||||
supportedServiceTypesAndVersions,
|
||||
token,
|
||||
...request.user
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,12 +26,11 @@ import {
|
||||
saveServiceType,
|
||||
saveServiceVersion,
|
||||
setSettingsService,
|
||||
startService,
|
||||
stopService
|
||||
} from './handlers';
|
||||
|
||||
import type { OnlyId } from '../../../../types';
|
||||
import type { ActivateWordpressFtp, CheckService, CheckServiceDomain, DeleteServiceSecret, DeleteServiceStorage, GetServiceLogs, SaveService, SaveServiceDestination, SaveServiceSecret, SaveServiceSettings, SaveServiceStorage, SaveServiceType, SaveServiceVersion, ServiceStartStop, SetWordpressSettings } from './types';
|
||||
import { startService, stopService } from '../../../../lib/services/handlers';
|
||||
|
||||
const root: FastifyPluginAsync = async (fastify): Promise<void> => {
|
||||
fastify.addHook('onRequest', async (request) => {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { FastifyRequest } from "fastify";
|
||||
import { errorHandler, getDomain, isDev, prisma, supportedServiceTypesAndVersions, include, executeDockerCmd } from "../../../lib/common";
|
||||
import { errorHandler, getDomain, isDev, prisma, executeDockerCmd } from "../../../lib/common";
|
||||
import { supportedServiceTypesAndVersions } from "../../../lib/services/supportedVersions";
|
||||
import { includeServices } from "../../../lib/services/common";
|
||||
import { TraefikOtherConfiguration } from "./types";
|
||||
|
||||
function configureMiddleware(
|
||||
@@ -234,7 +236,7 @@ export async function traefikConfiguration(request, reply) {
|
||||
}
|
||||
const services: any = await prisma.service.findMany({
|
||||
where: { destinationDocker: { remoteEngine: false } },
|
||||
include,
|
||||
include: includeServices,
|
||||
orderBy: { createdAt: 'desc' },
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user