Skip to content

Commit 74f98e7

Browse files
committed
fix: home page posts display
1 parent 825d891 commit 74f98e7

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

client/app/pages/home/home.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class HomeComponent implements OnInit, OnDestroy {
7070
public ngOnInit() {
7171
this.notifyService.updateHeaderContent({ title: '', subTitle: [] })
7272
this.apiService.getPosts().subscribe((data) => {
73-
this.posts = data.slice(0, 4)
73+
this.posts = data.filter(({ hide }) => !hide).slice(0, 4)
7474
})
7575
this.apiService.getNewses().subscribe((data) => {
7676
this.news = data.slice(0, 4)

client/app/shared/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { LoggerService } from '../services/logger.service'
55
export const ROMI_METADATA = { pkg }
66

77
export const API_BASE_URL = isDevMode()
8-
? 'http://192.168.1.4:8000/api'
8+
? 'http://192.168.1.3:8000/api'
99
: typeof process !== 'undefined'
1010
? `http://127.0.0.1:${Number((process.env as { PORT: string }).PORT ?? 4200) - 1}/api`
1111
: '/api'

src/routes/global.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ pub async fn ssr_handler(
88
ssr: &State<SSR>,
99
logger: &State<Logger>,
1010
) -> Result<SSRResponse, Status> {
11-
let result = ssr.render(path.to_str().unwrap_or("")).await.map_err(|e| {
11+
Ok(ssr.render(path.to_str().unwrap_or("")).await.map_err(|e| {
1212
l_error!(logger, "SSR render error: {}", e);
1313
Status::InternalServerError
14-
})?;
15-
println!("SSR response: {:?}", result.headers);
16-
Ok(result)
14+
})?)
1715
}

0 commit comments

Comments
 (0)