Skip to content

Commit f992a77

Browse files
committed
Updated mclo.gs api
1 parent e015638 commit f992a77

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ dependencies {
105105
["windows-x86_64", "windows-aarch64", "linux-x86_64", "linux-aarch64", "macos-aarch64"].each {
106106
includeInJar "dev.kastle.webrtc:webrtc-java:1.0.3:$it"
107107
}
108-
includeInJar "gs.mclo:api:5.0.2"
108+
includeInJar "gs.mclo:api:6.2.0"
109109
includeInJar "net.lenni0451:optconfig:1.1.1"
110110

111111
includeInJarJ8(compileOnly("xyz.wagyourtail.jvmdowngrader:jvmdowngrader:1.3.6"))

src/main/java/net/raphimc/viaproxy/cli/command/impl/UploadLogCommand.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ public void register(final LiteralArgumentBuilder<CommandExecutor> builder) {
4848
try {
4949
final MclogsClient mclogsClient = new MclogsClient("ViaProxy", ViaProxy.VERSION);
5050
final UploadLogResponse apiResponse = mclogsClient.uploadLog(logFile.toPath()).get();
51-
if (apiResponse.isSuccess()) {
52-
context.getSource().sendMessage("Uploaded log file to " + apiResponse.getUrl());
53-
} else {
54-
context.getSource().sendMessage("The log file could not be uploaded: " + apiResponse.getError());
55-
}
51+
context.getSource().sendMessage("Uploaded log file to " + apiResponse.getUrl());
5652
} catch (ExecutionException e) {
5753
if (e.getCause() instanceof FileNotFoundException) {
5854
context.getSource().sendMessage("The log file could not be found");

src/main/java/net/raphimc/viaproxy/ui/impl/AdvancedTab.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,11 @@ private void addFooter(final Container container) {
182182
this.uploadLogsButton.setEnabled(false);
183183
final MclogsClient mclogsClient = new MclogsClient("ViaProxy", ViaProxy.VERSION);
184184
final UploadLogResponse apiResponse = mclogsClient.uploadLog(logFile.toPath()).get();
185-
if (apiResponse.isSuccess()) {
186-
ViaProxyWindow.openURL(apiResponse.getUrl());
187-
final StringSelection selection = new StringSelection(apiResponse.getUrl());
188-
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, selection);
189-
ViaProxyWindow.showInfo("<html>" + I18n.get("tab.advanced.upload_latest_log.success", "<a href=\"\">" + apiResponse.getUrl() + "</a>") + "</html>");
190-
} else {
191-
ViaProxyWindow.showError(I18n.get("tab.advanced.upload_latest_log.error_generic", apiResponse.getError()));
192-
}
185+
186+
ViaProxyWindow.openURL(apiResponse.getUrl());
187+
final StringSelection selection = new StringSelection(apiResponse.getUrl());
188+
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, selection);
189+
ViaProxyWindow.showInfo("<html>" + I18n.get("tab.advanced.upload_latest_log.success", "<a href=\"\">" + apiResponse.getUrl() + "</a>") + "</html>");
193190
} catch (ExecutionException e) {
194191
if (e.getCause() instanceof FileNotFoundException) {
195192
ViaProxyWindow.showError(I18n.get("tab.advanced.upload_latest_log.error_not_found"));

0 commit comments

Comments
 (0)