mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-21 07:49:13 +00:00
refactor: use pastes.dev for viewing userdata dumps
This commit is contained in:
@@ -44,6 +44,8 @@ import static net.william278.husksync.util.DumpProvider.BYTEBIN_URL;
|
|||||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
public class UserDataDumper implements Flusher {
|
public class UserDataDumper implements Flusher {
|
||||||
|
|
||||||
|
private static final String PASTE_VIEWER_URL = "https://pastes.dev";
|
||||||
|
|
||||||
private final DataSnapshot.Packed snapshot;
|
private final DataSnapshot.Packed snapshot;
|
||||||
private final User user;
|
private final User user;
|
||||||
private final HuskSync plugin;
|
private final HuskSync plugin;
|
||||||
@@ -65,7 +67,7 @@ public class UserDataDumper implements Flusher {
|
|||||||
@NotNull
|
@NotNull
|
||||||
public String toWeb() {
|
public String toWeb() {
|
||||||
try {
|
try {
|
||||||
return "%s/%s".formatted(BYTEBIN_URL, uploadDump(toString(), BYTEBIN_URL, "husksync"));
|
return "%s/%s".formatted(PASTE_VIEWER_URL, uploadDump(toString(), BYTEBIN_URL, "husksync"));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
plugin.log(Level.SEVERE, "Failed to upload data.", e);
|
plugin.log(Level.SEVERE, "Failed to upload data.", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user