Skip to content

Commit

Permalink
Merge pull request shoel-uddin#58 from shoel-uddin/ian_version
Browse files Browse the repository at this point in the history
fixed profile
  • Loading branch information
JoshuaNow authored Jan 14, 2021
2 parents 5173368 + 9619640 commit 57b87e9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,24 @@


<br>
<h2 align="center"> User Story </h2>
<h2 align="center"> User Story </h2>

- As a User I want to see a Homepage with app info
- As a User I want to be able to sign up or login at the homepage
- As a User I want to login and see my posts and others post
- As a User I want to be able to add posts with pictures/videos using username
- As a User I want to add comments to other's posts
- As a User I want to be able to Logout
- As a User I want to
- As a User I want to
- As a User I want to
- As a User I want to search for games
- As a User I want to search for posts
- As a User I want to edit and delete my posts
- As a User I want to edit and delete my comments

<br>
<h2 align="center"> Tech/Tools Used </h2>

- HTML
- CSS
- CSS - Flexbox, Grid
- Npm
- ExpressJS
- AWS
Expand All @@ -43,11 +45,20 @@
- Finding out how to log in with either username or email
- Verifying email or username to be unique regardless of capitalization
- Calling displayname instead of username to show up on the pages.
-

- Thursday 1/14/21:
- Trying to attach the game model and the post model
- Would not send the game information with each post because the relationship was not there
- Added a gameid in the post model as a foreign key and used it to find the game title for each post and used the gameid as the url to link each game title to that game's display page

- Thursday 1/14/21:
- Having some problems with CSS and Grid
- Content not displaying correctly
- Fixed it with trial and error

<br>
<h2 align="center"> Database Design </h2>
-


<br>
<h2 align="center"> Diagrams </h2>
Expand Down
3 changes: 2 additions & 1 deletion controllers/member.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ const profile = async (req, res) => {
],
});
for (let p of member) {
// p.User = await User.findByPk(p.userid);
p.User = await User.findByPk(p.userid);
p.Game = await Game.findByPk(p.gameid)
}
console.log(JSON.stringify(member, null, 4));
res.render("profile", {
locals: {
member,
user,
id
},
...layout,
});
Expand Down
Binary file added public/images/modelDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<li><a href="/logout">Logout</a></li>
</ul>
<ul>
${posts.map(p => { return `
${member.map(p => { return `
<li>
<div class="postDiv">
<h2>${p.title}</h2>
Expand Down

0 comments on commit 57b87e9

Please sign in to comment.