mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Некорректный UpdateRequest
This commit is contained in:
parent
71018a0cdf
commit
20913cdbc6
1 changed files with 5 additions and 13 deletions
|
@ -1,17 +1,18 @@
|
|||
package pro.gravit.launcher.request.update;
|
||||
|
||||
import pro.gravit.launcher.LauncherAPI;
|
||||
import pro.gravit.launcher.LauncherNetworkAPI;
|
||||
import pro.gravit.launcher.events.request.UpdateRequestEvent;
|
||||
import pro.gravit.launcher.request.Request;
|
||||
import pro.gravit.launcher.request.websockets.StandartClientWebSocketService;
|
||||
import pro.gravit.launcher.request.websockets.WebSocketRequest;
|
||||
import pro.gravit.utils.helper.LogHelper;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
public final class UpdateRequest extends Request<UpdateRequestEvent> implements WebSocketRequest {
|
||||
|
||||
public UpdateRequest(String dirName) {
|
||||
this.dirName = dirName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "update";
|
||||
|
@ -27,14 +28,5 @@ public UpdateRequestEvent requestDo(StandartClientWebSocketService service) thro
|
|||
|
||||
// Instance
|
||||
@LauncherNetworkAPI
|
||||
private transient final Path dir;
|
||||
|
||||
public Path getDir() {
|
||||
return dir;
|
||||
}
|
||||
|
||||
@LauncherAPI
|
||||
public UpdateRequest(Path dir) {
|
||||
this.dir = Objects.requireNonNull(dir, "dir");
|
||||
}
|
||||
private final String dirName;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue