mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-02-27 08:06:42 +00:00
dont expose site.private_key in api
This commit is contained in:
parent
1b4998e396
commit
0dad9a6393
1 changed files with 2 additions and 1 deletions
|
@ -14,11 +14,12 @@ pub struct SiteView {
|
|||
|
||||
impl SiteView {
|
||||
pub fn read(conn: &PgConnection) -> Result<Self, Error> {
|
||||
let (site, counts) = site::table
|
||||
let (mut site, counts) = site::table
|
||||
.inner_join(site_aggregates::table)
|
||||
.select((site::all_columns, site_aggregates::all_columns))
|
||||
.first::<(Site, SiteAggregates)>(conn)?;
|
||||
|
||||
site.private_key = None;
|
||||
Ok(SiteView { site, counts })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue