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 4261b5e commit adaf5acCopy full SHA for adaf5ac
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