v0.14.23-fixed_js
This commit is contained in:
+2
-2
@@ -654,12 +654,12 @@ async fn public_custom_chart(
|
||||
Query(query): Query<PublicCustomChartQuery>,
|
||||
) -> Result<Json<Value>, AppError> {
|
||||
if token.len() < 32 || token.len() > 128 || !token.starts_with("chart_") {
|
||||
return Err(AppError::NotFound("custom chart".into()));
|
||||
return Err(AppError::NotFound("chart id not found".into()));
|
||||
}
|
||||
let payload = state
|
||||
.db
|
||||
.get_public_chart_share(&hash_token(&token))?
|
||||
.ok_or_else(|| AppError::NotFound("custom chart".into()))?;
|
||||
.ok_or_else(|| AppError::NotFound("chart id not found".into()))?;
|
||||
let share: PublicCustomChartShare = serde_json::from_value(payload)?;
|
||||
validate_public_chart_spec(&share.series)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user