fix: permission issues

fix: white labaled version
This commit is contained in:
Andras Bacsai
2022-07-08 13:38:19 +02:00
parent c63237684a
commit 222adb212b
10 changed files with 85 additions and 46 deletions

View File

@@ -0,0 +1,19 @@
import { FastifyPluginAsync } from 'fastify';
import { errorHandler, version } from '../../../../lib/common';
const root: FastifyPluginAsync = async (fastify, opts): Promise<void> => {
fastify.get('/', async (request) => {
try {
return {
version,
whiteLabeled: process.env.COOLIFY_WHITE_LABELED === 'true',
whiteLabeledIcon: process.env.COOLIFY_WHITE_LABELED_ICON,
}
} catch ({ status, message }) {
return errorHandler({ status, message })
}
});
};
export default root;