fix: umami + ghost issues

This commit is contained in:
Andras Bacsai
2022-11-08 14:42:04 +01:00
parent 82d7fb883d
commit 0ebc0217f3
7 changed files with 42 additions and 63 deletions

View File

@@ -49,10 +49,6 @@ export async function refreshTags() {
}
} catch (error) {
console.log(error)
throw {
status: 500,
message: 'Could not fetch templates from get.coollabs.io'
};
}
return {};
@@ -73,12 +69,7 @@ export async function refreshTemplates() {
}
} catch (error) {
console.log(error)
throw {
status: 500,
message: 'Could not fetch templates from get.coollabs.io'
};
}
return {};
} catch ({ status, message }) {
return errorHandler({ status, message });

View File

@@ -1,5 +1,5 @@
import { FastifyPluginAsync } from 'fastify';
import { checkUpdate, login, showDashboard, update, resetQueue, getCurrentUser, cleanupManually, restartCoolify, refreshTemplates } from './handlers';
import { checkUpdate, login, showDashboard, update, resetQueue, getCurrentUser, cleanupManually, restartCoolify } from './handlers';
import { GetCurrentUser } from './types';
export interface Update {
@@ -52,10 +52,6 @@ const root: FastifyPluginAsync = async (fastify): Promise<void> => {
fastify.post('/internal/cleanup', {
onRequest: [fastify.authenticate]
}, async (request) => await cleanupManually(request));
fastify.post('/internal/refreshTemplates', {
onRequest: [fastify.authenticate]
}, async () => await refreshTemplates());
};
export default root;