[CLEANUP] Log api that is not used in the app

Initially was added to check if server is online
This commit is contained in:
Hossain Khan
2025-05-03 14:02:07 -04:00
parent 9c58fef632
commit aae68a304d
3 changed files with 0 additions and 29 deletions
@@ -104,17 +104,6 @@ class TrmnlDisplayRepository
return displayInfo
}
/**
* Check the server status by making a request to the log endpoint.
*/
suspend fun checkServerStatus(): Boolean {
val response = apiService.getLog("RANDOM-ID", "RANDOM-TOKEN").successOrNull()
Timber.d("Device log status response: $response")
// If we got 200 OK, we assume the server is up
return response != null
}
/**
* Generates fake display info for debugging purposes without wasting an API request.
*
@@ -3,7 +3,6 @@ package ink.trmnl.android.network
import com.slack.eithernet.ApiResult
import ink.trmnl.android.network.model.TrmnlCurrentImageResponse
import ink.trmnl.android.network.model.TrmnlDisplayResponse
import ink.trmnl.android.network.model.TrmnlLogResponse
import retrofit2.http.GET
import retrofit2.http.Header
@@ -39,10 +38,4 @@ interface TrmnlApiService {
suspend fun getCurrentDisplayData(
@Header("access-token") accessToken: String,
): ApiResult<TrmnlCurrentImageResponse, Unit>
@GET("api/log")
suspend fun getLog(
@Header("ID") id: String,
@Header("Access-Token") accessToken: String,
): ApiResult<TrmnlLogResponse, Unit>
}
@@ -1,11 +0,0 @@
package ink.trmnl.android.network.model
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class TrmnlLogResponse(
@Json(name = "status") val status: Int,
@Json(name = "error") val error: String? = null,
// Add other fields if available in the actual response
)