Browse Source

front end demo

woat 6 years ago
parent
commit
02c5d452a7

+ 1
- 1
src/app/post.service.ts View File

13
 		return this.http.get('/api/post/all').toPromise();
13
 		return this.http.get('/api/post/all').toPromise();
14
 	}
14
 	}
15
 
15
 
16
-	postPost(messageBody, githubId = 'j-n000') {
16
+	postPost(messageBody, githubId = 'omg') {
17
 		this.http.post(`/api/post/${githubId}/new-post`, { body: messageBody }).toPromise();
17
 		this.http.post(`/api/post/${githubId}/new-post`, { body: messageBody }).toPromise();
18
 	}
18
 	}
19
 }
19
 }

+ 6
- 6
src/app/timeline/post/post.component.ts View File

1
 import { Component, Input, OnInit } from '@angular/core';
1
 import { Component, Input, OnInit } from '@angular/core';
2
 
2
 
3
 @Component({
3
 @Component({
4
-  selector: 'app-post',
5
-  templateUrl: './post.component.html',
6
-  styleUrls: ['./post.component.css']
4
+	selector: 'app-post',
5
+	templateUrl: './post.component.html',
6
+	styleUrls: ['./post.component.css']
7
 })
7
 })
8
 
8
 
9
 export class PostComponent implements OnInit {
9
 export class PostComponent implements OnInit {
10
 	@Input()post: any;
10
 	@Input()post: any;
11
 
11
 
12
-  constructor() { }
12
+	constructor() { }
13
 
13
 
14
-  ngOnInit() {
15
-  }
14
+	ngOnInit() {
15
+	}
16
 
16
 
17
 }
17
 }

+ 0
- 1
src/app/timeline/status/status.component.ts View File

8
 	styleUrls: ['./status.component.css']
8
 	styleUrls: ['./status.component.css']
9
 })
9
 })
10
 export class StatusComponent implements OnInit {
10
 export class StatusComponent implements OnInit {
11
-	sender = 'Origin'; // pull web3.address
12
 	body: string;
11
 	body: string;
13
 
12
 
14
 	constructor(
13
 	constructor(

+ 0
- 1
src/app/timeline/timeline.component.ts View File

20
 		this.posts = posts;
20
 		this.posts = posts;
21
 		console.log(posts);
21
 		console.log(posts);
22
 	}
22
 	}
23
-
24
 }
23
 }