Skip to content

Commit

Permalink
fixed controller id issue, added readme info and about/contact info
Browse files Browse the repository at this point in the history
  • Loading branch information
Stormy110 committed Jan 14, 2021
1 parent 57b87e9 commit 0843e59
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 11 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@
<br>
<h2 align="center"> Database Design </h2>

![Database Model Relationships](./public/images/modelDiagram.png)

<br>
<h2 align="center"> Diagrams </h2>
-

![Newsfeed sketch](./public/images/Newsfeed.png)

![Profile sketch](./public/images/Profile.png)

<br>
<h2 align="center"> Demo of App </h2>
Expand All @@ -73,16 +77,20 @@

### Joshua Lopez

-
- [Github](https://github.com/JoshuaNow)
- [Linkedin](https://www.linkedin.com/in/joshua-lopez-dev/)

### Ian Storms

-
- [Github](https://github.com/Stormy110)
- [Linkedin](https://www.linkedin.com/in/ianstorms/)

### Kevin Tucker

-
- [Github](https://github.com/k5tuck)
- [Linkedin](https://www.linkedin.com/in/ktuck18/)

### Shoel Uddin

-
- [Github](https://github.com/shoel-uddin)
- [Linkedin](https://www.linkedin.com/in/shoel-uddin/)
7 changes: 7 additions & 0 deletions controllers/member.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { layout } = require('../utils');
const Sequelize = require('sequelize');
const { Op } = require("sequelize");
const { User, Comment, Post, Game } = require("../models");
const UPLOAD_URL = "/uploads/media/";

Expand Down Expand Up @@ -257,6 +259,7 @@ const search = (req, res) => {

const processSearch= async (req, res) => {
const { searchContent } = req.body;
const { id } = req.session.user;

try {
if (searchContent) {
Expand All @@ -283,9 +286,11 @@ const processSearch= async (req, res) => {
p.User = await User.findByPk(p.userid);
p.Game = await Game.findByPk(p.gameid)
}
console.log(posts)
res.render("search-results", {
locals: {
posts,
id
},
...layout,
});
Expand All @@ -298,6 +303,7 @@ const processSearch= async (req, res) => {

const ProcessGameSearch= async (req, res) => {
const { searchStuff } = req.body;
const { id } = req.session.user;

try {
if (searchStuff) {
Expand Down Expand Up @@ -332,6 +338,7 @@ const ProcessGameSearch= async (req, res) => {
res.render("search-results", {
locals: {
posts,
id
},
...layout,
});
Expand Down
Binary file added public/images/Newsfeed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/Profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
<li><a href="/about">About</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
<h1>This is the about page</h1>
<p>More information to come...</p>
<h1>About Us</h1>
<p>We are a group of coders who love to game out with our friends.<br>
Our goal for this project was to build an application that brings<br>
gamers together. Gamer's Paradise is a social site where users can <br>
share video games they have played recently and other users can <br>
review and comment their opinions about those games. We hope you enjoy!
</p>

${footer}
9 changes: 7 additions & 2 deletions templates/members-about.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<li><a href="/members/contact">Contact</a></li>
<li><a href="/members/logout">Logout</a></li>
</ul>
<h1>This is the about page</h1>
<p>More information to come...</p>
<h1>About Us</h1>
<p>We are a group of coders who love to game out with our friends.<br>
Our goal for this project was to build an application that brings<br>
gamers together. Gamer's Paradise is a social site where users can <br>
share video games they have played recently and other users can <br>
review and comment their opinions about those games. We hope you enjoy!
</p>
${footer}
23 changes: 21 additions & 2 deletions templates/members-contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@
<li><a href="/members/contact">Contact</a></li>
<li><a href="/members/logout">Logout</a></li>
</ul>
<h1>This is the contact page</h1>
<p>More information to come...</p>
<h1>Contact Us.</h1>
<h3>Joshua Lopez</h3>
<ul>
<li><a href="https://github.com/JoshuaNow">Github</a></li>
<li><a href="https://www.linkedin.com/in/joshua-lopez-dev/">LinkedIn</a></li>
</ul>
<h3>Ian Storms</h3>
<ul>
<li><a href="https://github.com/Stormy110">Github</a></li>
<li><a href="https://www.linkedin.com/in/ianstorms/">LinkedIn</a></li>
</ul>
<h3>Kevin Tucker</h3>
<ul>
<li><a href="https://github.com/k5tuck">Github</a></li>
<li><a href="https://www.linkedin.com/in/ktuck18/">LinkedIn</a></li>
</ul>
<h3>Shoel Uddin</h3>
<ul>
<li><a href="https://github.com/shoel-uddin">Github</a></li>
<li><a href="https://www.linkedin.com/in/shoel-uddin/">LinkedIn</a></li>
</ul>
${footer}
1 change: 1 addition & 0 deletions templates/search-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ <h3>${p.Game == null ? "" : p.Game.title}</h3>

` }).join('')}
</ul>
<a href="/members"><button>Home</button></a>
${footer}

0 comments on commit 0843e59

Please sign in to comment.