Skip to content

Commit

Permalink
fix angular linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbush committed Oct 5, 2024
1 parent ad58958 commit bd821b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions postrify-frontend/src/app/components/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ import { Page } from '../../models/page.model';
export class HomeComponent implements OnInit {
posts: PostResponseDTO[] = [];
isLogged = false;
currentPage: number = 0;
pageSize: number = 10;
totalPages: number = 0;
totalElements: number = 0;
currentPage = 0;
pageSize = 10;
totalPages = 0;
totalElements = 0;

constructor(
private postService: PostService,
Expand Down
7 changes: 3 additions & 4 deletions postrify-frontend/src/app/services/post.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ export class PostService {
constructor(private http: HttpClient) {}

getAllPosts(
page: number = 0,
size: number = 10,
page: number,
size: number,
): Observable<Page<PostResponseDTO>> {
let params = new HttpParams()
const params = new HttpParams()
.set('page', page.toString())
.set('size', size.toString());

return this.http.get<Page<PostResponseDTO>>(this.apiUrl, { params });
}

Expand Down

0 comments on commit bd821b3

Please sign in to comment.