Skip to content

Commit

Permalink
Analyse logs without storing them on mclo.gs (#3196)
Browse files Browse the repository at this point in the history
Co-authored-by: Prospector <[email protected]>
  • Loading branch information
JulianVennen and Prospector authored Jan 29, 2025
1 parent e368e35 commit a4e024c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions apps/frontend/src/pages/servers/manage/[id]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,11 @@ interface ErrorData {
}
const inspectingError = ref<ErrorData | null>(null);
const mcError = ref<any>(null);
const inspectError = async () => {
const log = await props.server.fs?.downloadFile("logs/latest.log");
const response = (await $fetch("https://api.mclo.gs/1/log", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
content: log,
}),
})) as any;
mcError.value = response;
// @ts-ignore
const analysis = (await $fetch(`https://api.mclo.gs/1/insights/${response.id}`, {
const analysis = (await $fetch(`https://api.mclo.gs/1/analyse`, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Expand All @@ -269,7 +256,6 @@ const inspectError = async () => {
const clearError = () => {
inspectingError.value = null;
mcError.value = null;
};
watch(
Expand Down

0 comments on commit a4e024c

Please sign in to comment.