add server pinger
Some checks are pending
ci / deploy (push) Waiting to run

This commit is contained in:
Lee
2024-04-10 07:43:13 +01:00
parent ed3b7e3064
commit 25c69e11e1
38 changed files with 104 additions and 1299 deletions

View File

@ -1,29 +0,0 @@
package cc.fascinated.model.response;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@Getter @AllArgsConstructor
public class Response {
/**
* The status code of this error.
*/
private HttpStatus status;
/**
* The message of this error.
*/
private String message;
/**
* Gets this response as a {@link ResponseEntity}.
*
* @return the response entity
*/
public ResponseEntity<?> toResponseEntity() {
return new ResponseEntity<>(this, status);
}
}

View File

@ -1,11 +0,0 @@
package cc.fascinated.model.response.impl;
import cc.fascinated.model.response.Response;
import org.springframework.http.HttpStatus;
public class InvalidPartResponse extends Response {
public InvalidPartResponse() {
super(HttpStatus.NOT_FOUND, "Invalid part name.");
}
}

View File

@ -1,11 +0,0 @@
package cc.fascinated.model.response.impl;
import cc.fascinated.model.response.Response;
import org.springframework.http.HttpStatus;
public class PlayerNotFoundResponse extends Response {
public PlayerNotFoundResponse() {
super(HttpStatus.NOT_FOUND, "Player not found.");
}
}