Removed post types completely.

This commit is contained in:
Joachim Nielandt 2018-03-04 16:55:10 +01:00
parent 462aedd1fc
commit 2d68daf383
3 changed files with 7 additions and 9 deletions

View File

@ -19,7 +19,7 @@ export class PostComponent implements OnInit {
// console.log('post component has inited: '+this.post.id);
// console.log(this.post);
this.dataloaderService.getPost(this.post.type, this.post.id).subscribe(content => {
this.dataloaderService.getPost(this.post.id).subscribe(content => {
this.htmlContainer.nativeElement.innerHTML = content;
});
}

View File

@ -3,11 +3,6 @@
</div>
-->
<div class="btn-group" role="group" aria-label="Categories">
<button type="button" class="btn btn-secondary">All</button>
<button *ngFor='let postType of postTypes | async' type="button" class="btn btn-secondary">{{postType}}</button>
</div>
<div>
<app-post *ngFor='let post of posts | async' [post]="post"></app-post>
</div>

View File

@ -37,14 +37,17 @@ export class DataloaderService {
* Fetch the 'full fat' post. This returns HTML content that can be wrapped in any container, no sanitizing done.
* @param filename the filename for which the post needs to be fetched
*/
getPost(type: String, id: String): Observable<String> {
getPost(id: String): Observable<String> {
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'text/html', 'Accept': 'text/html' })
};
// console.log('launching GET');
const url = 'assets/post/' + type + '/' + id + '/full.html';
const url = 'assets/post/' + id + '/full.html';
// console.log('fetching: '+url);
console.log('getPost called: '+url);
return this.http.get(url, {responseType: 'text'});
}