We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eef5ea6 commit 62152a5Copy full SHA for 62152a5
packages/core/api-public/src/metadata.rs
@@ -1,10 +1,15 @@
1
use axum::Json;
2
use axum::response::IntoResponse;
3
+use rivet_api_builder::{ApiError, extract::Extension};
4
use serde_json::json;
5
6
+use crate::ctx::ApiCtx;
7
+
8
/// Returns metadata about the API including runtime and version
9
#[tracing::instrument(skip_all)]
-pub async fn get_metadata() -> impl IntoResponse {
10
+pub async fn get_metadata(Extension(ctx): Extension<ApiCtx>) -> impl IntoResponse {
11
+ ctx.skip_auth();
12
13
Json(json!({
14
"runtime": "engine",
15
"version": env!("CARGO_PKG_VERSION")
0 commit comments