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.
json!
1 parent 8726c20 commit d450176Copy full SHA for d450176
src/controllers/team.rs
@@ -12,9 +12,5 @@ pub fn show_team(req: &mut dyn RequestExt) -> EndpointResult {
12
let conn = req.db_read_only()?;
13
let team: Team = teams.filter(login.eq(name)).first(&*conn)?;
14
15
- #[derive(Serialize)]
16
- struct R {
17
- team: EncodableTeam,
18
- }
19
- Ok(req.json(&R { team: team.into() }))
+ Ok(req.json(&json!({ "team": EncodableTeam::from(team) })))
20
}
0 commit comments