Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
EloyMartinez committed Jan 8, 2025
1 parent 1c5719b commit ea6051a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/server/src/controllers/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ pub async fn update_metadata(req: HttpRequest) -> actix_web::Result<HttpResponse
let repo = get_repo(&app_data.path, &namespace, &repo_name)?;
let resource = parse_resource(&req, &repo)?;

repositories::entries::update_metadata(&repo, resource.version.to_str().unwrap_or_default())?;
let version_str = resource
.version
.to_str()
.ok_or(OxenHttpError::BadRequest("Missing resource version".into()))?;

repositories::entries::update_metadata(&repo, version_str)?;
Ok(HttpResponse::Ok().json(StatusMessage::resource_updated()))
}

0 comments on commit ea6051a

Please sign in to comment.