From 7cd71112b5206b751cb3607f613163e5986480e3 Mon Sep 17 00:00:00 2001 From: angelinasu57 Date: Thu, 30 Mar 2023 12:57:18 -0400 Subject: [PATCH 1/3] Finish creating viewForum component HTML with Response, First and Last name, and date for each form response. --- frontend/src/app/viewforum/viewforum.component.html | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/app/viewforum/viewforum.component.html b/frontend/src/app/viewforum/viewforum.component.html index 7aa51d1..985d504 100644 --- a/frontend/src/app/viewforum/viewforum.component.html +++ b/frontend/src/app/viewforum/viewforum.component.html @@ -11,7 +11,6 @@ {{ post.content }} {{ post.user.first_name}} - {{ post.user.last_name }} {{ post.timestamp | date:'YYYY/MM/dd @ hh:MMaa' }} From 37c113f64b6762acd2ed54c47f72b24c531024ca Mon Sep 17 00:00:00 2001 From: angelinasu57 Date: Thu, 30 Mar 2023 13:13:25 -0400 Subject: [PATCH 2/3] Add in Last Name in the table to keep track of the responses, as per suggestion. --- frontend/src/app/viewforum/viewforum.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/app/viewforum/viewforum.component.html b/frontend/src/app/viewforum/viewforum.component.html index 985d504..384e174 100644 --- a/frontend/src/app/viewforum/viewforum.component.html +++ b/frontend/src/app/viewforum/viewforum.component.html @@ -11,6 +11,7 @@ {{ post.content }} {{ post.user.first_name}} + {{ post.user.last_name}} {{ post.timestamp | date:'YYYY/MM/dd @ hh:MMaa' }} From f2d36783dcc0b5e5b8fb1f2c79a4ccb35ea47a98 Mon Sep 17 00:00:00 2001 From: angelinasu57 Date: Thu, 30 Mar 2023 13:48:19 -0400 Subject: [PATCH 3/3] Adjusted endpoints and remove comments. --- .../src/app/makeforum/makeforum.component.html | 17 ----------------- frontend/src/app/post.service.ts | 4 ++-- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/frontend/src/app/makeforum/makeforum.component.html b/frontend/src/app/makeforum/makeforum.component.html index c1dd101..a4f88dd 100644 --- a/frontend/src/app/makeforum/makeforum.component.html +++ b/frontend/src/app/makeforum/makeforum.component.html @@ -9,21 +9,4 @@

Make a Forum Post With Resources!!

- diff --git a/frontend/src/app/post.service.ts b/frontend/src/app/post.service.ts index 4acfb63..6e5b42c 100644 --- a/frontend/src/app/post.service.ts +++ b/frontend/src/app/post.service.ts @@ -41,12 +41,12 @@ export class PostService { // }) // ) // return new_table - return this.http.get("/api/forum"); + return this.http.get("/api/posts"); } makePost(id: number, content: string, user: Profile, votes: [], timestamp: Date): Observable { let post: Post = {id, content, user, votes, timestamp}; - return this.http.post("/api/forum/", post); + return this.http.post("/api/posts/", post); } // deletePost(id: number) {