mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 22:14:26 +00:00
fix: Accept logged and not logged user in /base
This commit is contained in:
1 parent
1d93658e56
commit
4448b86b93
1 file changed
+8
@@ -2,6 +2,14 @@ import { FastifyPluginAsync } from 'fastify';
|
||||
import { errorHandler, listSettings, version } from '../../../../lib/common';
|
||||
|
||||
const root: FastifyPluginAsync = async (fastify): Promise<void> => {
|
||||
fastify.addHook('onRequest', async (request) => {
|
||||
try {
|
||||
return await request.jwtVerify();
|
||||
} catch(error){
|
||||
return {};
|
||||
}
|
||||
})
|
||||
|
||||
fastify.get('/', async (request) => {
|
||||
const teamId = request.user?.teamId;
|
||||
const settings = await listSettings()
|
||||
|
||||
Reference in new issue
Block a user