4 Commits
Author SHA1 Message Date
nyeki 123cdc65e3 Release 1.1.1 version 2025-07-13 16:17:50 -03:00
nyeki 164055dd2d Add healthcheck endpoint to router 2025-07-13 19:13:12 +00:00
nyeki 8dbdc23e52 Release 1.1.0 version 2025-07-13 16:11:25 -03:00
nyeki 446dc4b47f Add healthcheck endpoint 2025-07-13 19:07:12 +00:00
3 changed files with 10 additions and 2 deletions
Generated
+1 -1
View File
@@ -84,7 +84,7 @@ dependencies = [
[[package]] [[package]]
name = "api" name = "api"
version = "1.0.0" version = "1.1.0"
dependencies = [ dependencies = [
"axum", "axum",
"bitcode", "bitcode",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "api" name = "api"
version = "1.0.0" version = "1.1.1"
edition = "2024" edition = "2024"
[dependencies] [dependencies]
+8
View File
@@ -10,6 +10,7 @@ pub mod v1;
pub fn router() -> Router<Arc<State>> { pub fn router() -> Router<Arc<State>> {
Router::new() Router::new()
.route("/", get(docs)) .route("/", get(docs))
.route("/healthcheck", get(healthcheck))
.nest("/v1", v1::router()) .nest("/v1", v1::router())
} }
@@ -31,6 +32,9 @@ async fn docs() -> &'static str {
The current endpoints are: The current endpoints are:
GET /healthcheck
Returns OK when the API is running.
GET /v1/profile GET /v1/profile
Return's the user's profile (username, name, avatar, banner, and URL). Return's the user's profile (username, name, avatar, banner, and URL).
@@ -113,3 +117,7 @@ async fn docs() -> &'static str {
" "
) )
} }
async fn healthcheck() -> &'static str {
"OK"
}