From 767fc17c8415fc647a6b6d2aa7bbc51ae5e0d384 Mon Sep 17 00:00:00 2001
From: proyectomarco
Date: Fri, 4 Nov 2022 17:49:44 +0100
Subject: [PATCH 01/20] routes done
---
Project/config/index.js | 15 +++++++++++----
Project/models/User.model.js | 2 +-
Project/routes/auth.routes.js | 16 +++++++---------
Project/routes/index.routes.js | 12 ++++++++++++
Project/views/auth/login.hbs | 6 +++---
Project/views/index.hbs | 4 +++-
Project/views/restaurants/restaurant-list.hbs | 1 +
Project/views/user/profile.hbs | 4 ++++
8 files changed, 42 insertions(+), 18 deletions(-)
create mode 100644 Project/views/restaurants/restaurant-list.hbs
create mode 100644 Project/views/user/profile.hbs
diff --git a/Project/config/index.js b/Project/config/index.js
index 81ca4e4..a95486c 100644
--- a/Project/config/index.js
+++ b/Project/config/index.js
@@ -51,15 +51,22 @@ module.exports = (app) => {
favicon(path.join(__dirname, "..", "public", "images", "favicon.ico"))
);
+
// ℹ️ Middleware that adds a "req.session" information and later to check that you are who you say you are 😅
app.use(
session({
- secret: process.env.SESSION_SECRET || "super hyper secret key",
+ secret: process.env.SESSION_SECRET,
resave: false,
saveUninitialized: false,
+ cookie: {
+ sameSite: process.env.NODE_ENV === 'production' ? 'none' : 'lax',
+ secure: process.env.NODE_ENV === 'production',
+ httpOnly: true,
+ maxAge: 60000
+ },
store: MongoStore.create({
- mongoUrl: MONGO_URI,
- }),
- })
+ mongoUrl: process.env.MONGODB_URI || 'mongodb://localhost:27017/project2'
+ })
+ })
);
};
diff --git a/Project/models/User.model.js b/Project/models/User.model.js
index 0dacd5d..46738dc 100644
--- a/Project/models/User.model.js
+++ b/Project/models/User.model.js
@@ -5,7 +5,7 @@ const userSchema = new Schema(
{
username: {
type: String,
- required: false,
+ required: true,
unique: true,
trim: true,
},
diff --git a/Project/routes/auth.routes.js b/Project/routes/auth.routes.js
index 474cb56..c22d486 100644
--- a/Project/routes/auth.routes.js
+++ b/Project/routes/auth.routes.js
@@ -14,6 +14,7 @@ const User = require("../models/User.model");
// Require necessary (isLoggedOut and isLiggedIn) middleware in order to control access to specific routes
const isLoggedOut = require("../middleware/isLoggedOut");
const isLoggedIn = require("../middleware/isLoggedIn");
+const { response } = require("express");
// GET /auth/signup
router.get("/signup", isLoggedOut, (req, res) => {
@@ -134,22 +135,19 @@ router.post("/login", isLoggedOut, (req, res, next) => {
// Remove the password field
delete req.session.currentUser.password;
- res.redirect("/");
+ res.redirect("/restaurants");
})
.catch((err) => next(err)); // In this case, we send error handling to the error handling middleware.
})
.catch((err) => next(err));
});
-// GET /auth/logout
-router.get("/logout", isLoggedIn, (req, res) => {
- req.session.destroy((err) => {
- if (err) {
- res.status(500).render("auth/logout", { errorMessage: err.message });
- return;
- }
- res.redirect("/");
+
+router.post('/logout', (req, res, next) => {
+ req.session.destroy(err => {
+ if (err) next(err);
+ res.redirect('/');
});
});
diff --git a/Project/routes/index.routes.js b/Project/routes/index.routes.js
index f538ffe..df329e5 100644
--- a/Project/routes/index.routes.js
+++ b/Project/routes/index.routes.js
@@ -1,4 +1,5 @@
const express = require('express');
+const isLoggedIn = require('../middleware/isLoggedIn');
const router = express.Router();
/* GET home page */
@@ -6,4 +7,15 @@ router.get("/", (req, res, next) => {
res.render("index");
});
+
+// GET // User Profile
+router.get('/profile', isLoggedIn, (req, res) => {
+ res.render('user/profile')
+})
+
+router.get('/restaurants', (req, res) => {
+ res.render('restaurants/restaurant-list')
+})
+
+
module.exports = router;
diff --git a/Project/views/auth/login.hbs b/Project/views/auth/login.hbs
index 0d33b08..3506b3c 100644
--- a/Project/views/auth/login.hbs
+++ b/Project/views/auth/login.hbs
@@ -2,15 +2,15 @@
Log In
+ {{this.address}}
+ {{this.phonenumber}}
+ {{this.price}}
+ {{this.wifi}}
+ {{this.coworking}}
+ {{this.delivery}}
+ {{this.instagram}}
+
+ {{/each}}
+
+
diff --git a/Project/views/restaurants/restaurantCard.hbs b/Project/views/restaurants/restaurantCard.hbs
new file mode 100644
index 0000000..d80e749
--- /dev/null
+++ b/Project/views/restaurants/restaurantCard.hbs
@@ -0,0 +1,12 @@
+{{#each restaurantCard}}
+
{{this.style}}
+ {{this.address}}
+ {{this.phonenumber}}
+ {{this.price}}
+ {{this.wifi}}
+ {{this.coworking}}
+ {{this.delivery}}
+ {{this.instagram}}
+
+ {{/each}}
From 06d25172310f4277389ffe6b823ea483c448fd82 Mon Sep 17 00:00:00 2001
From: proyectomarco
Date: Mon, 7 Nov 2022 18:00:10 +0100
Subject: [PATCH 14/20] restaurant list done, but styles not
---
Project/routes/restaurants.routes.js | 22 +++----
Project/views/restaurants/restaurant-list.hbs | 66 ++++++++++++++++++-
Project/views/restaurants/restaurantCard.hbs | 4 +-
3 files changed, 74 insertions(+), 18 deletions(-)
diff --git a/Project/routes/restaurants.routes.js b/Project/routes/restaurants.routes.js
index a6ddbd4..e0634dc 100644
--- a/Project/routes/restaurants.routes.js
+++ b/Project/routes/restaurants.routes.js
@@ -6,9 +6,14 @@ const Restaurant = require("../models/restaurant");
-router.get('/restaurants', (req, res) => {
- res.render('restaurants/restaurant-list')
- })
+router.get('/restaurants' , async (req, res) => {
+ try {
+ const dbRestaurants = await Restaurant.find()
+ res.render('restaurants/restaurant-list', { dbRestaurants })
+ } catch (error) {
+ console.log(error)
+ }
+})
router.get('/create-restaurant', (req, res) => {
res.render('restaurants/restaurant-form', {options: ["Arabic", "Argentinian", "Bar", "Brazilian", "Burgers", "Chinese", "Korean",
@@ -31,15 +36,6 @@ router.post('/create-restaurant', async (req, res) => {
}
})
-router.get('/:restaurantId', async (req, res) => {
- const restaurantId = req.params.restaurantId
- try {
- const restaurant = await Restaurant.findById(restaurantId)
- console.log(restaurant)
- res.render('/restaurantCard', restaurant)
- } catch (error) {
- console.log(error)
- }
-})
+
module.exports = router
\ No newline at end of file
diff --git a/Project/views/restaurants/restaurant-list.hbs b/Project/views/restaurants/restaurant-list.hbs
index ad93b55..759a24e 100644
--- a/Project/views/restaurants/restaurant-list.hbs
+++ b/Project/views/restaurants/restaurant-list.hbs
@@ -1,6 +1,6 @@
Restaurant List
-{{#each restaurantCard}}
-
{{this.style}}
{{this.address}}
{{this.phonenumber}}
@@ -9,7 +9,67 @@
{{this.coworking}}
{{this.delivery}}
{{this.instagram}}
-
+ {{#if this.wifi}}
+
+ {{/if}}
{{/each}}
diff --git a/Project/views/restaurants/restaurantCard.hbs b/Project/views/restaurants/restaurantCard.hbs
index d80e749..886ae09 100644
--- a/Project/views/restaurants/restaurantCard.hbs
+++ b/Project/views/restaurants/restaurantCard.hbs
@@ -1,4 +1,4 @@
-{{#each restaurantCard}}
+{{#each restaurant}}
{{this.style}}
{{this.address}}
@@ -9,4 +9,4 @@
{{this.delivery}}
{{this.instagram}}
- {{/each}}
+{{/each}}
From 1bf6ae4565aed1b655e3c8b023e40f0ce12aca66 Mon Sep 17 00:00:00 2001
From: Carolina Calle
Date: Tue, 8 Nov 2022 10:16:57 +0100
Subject: [PATCH 15/20] rates updated
---
Project/models/rate.js | 5 ++
Project/routes/restaurants.routes.js | 38 ++++++++++
Project/views/restaurants/restaurant-list.hbs | 74 +------------------
Project/views/restaurants/restaurantCard.hbs | 11 ++-
4 files changed, 55 insertions(+), 73 deletions(-)
diff --git a/Project/models/rate.js b/Project/models/rate.js
index ad2587c..5d40e0a 100644
--- a/Project/models/rate.js
+++ b/Project/models/rate.js
@@ -7,6 +7,11 @@ const rateSchema = new Schema(
type: {type: Schema.Types.ObjectId, ref:"User"},
},
+ restaurant: {
+
+ type: {type: Schema.Types.ObjectId, ref:"Restaurant"},
+
+ },
rate: {
type: Boolean,
diff --git a/Project/routes/restaurants.routes.js b/Project/routes/restaurants.routes.js
index e0634dc..1cbc091 100644
--- a/Project/routes/restaurants.routes.js
+++ b/Project/routes/restaurants.routes.js
@@ -2,13 +2,16 @@ const express = require('express');
const isAdmin = require('../middleware/isAdmin');
const isLoggedIn = require('../middleware/isLoggedIn');
const router = express.Router();
+const User = require("../models/User.model");
const Restaurant = require("../models/restaurant");
+const Rate = require("../models/rate");
router.get('/restaurants' , async (req, res) => {
try {
const dbRestaurants = await Restaurant.find()
+ console.log(dbRestaurants)
res.render('restaurants/restaurant-list', { dbRestaurants })
} catch (error) {
console.log(error)
@@ -37,5 +40,40 @@ router.post('/create-restaurant', async (req, res) => {
})
+router.get("/restaurants/:restaurantId", async (req, res) => {
+ const restaurantId = req.params.restaurantId
+ try {
+ const restaurant = await Restaurant.findById(restaurantId)
+ res.render("restaurants/restaurantCard", restaurant)
+ } catch (err) {
+ console.log(err)
+ }
+ })
+
+
+ router.post('/restaurants/:restaurantId', async (req, res) => {
+ const rate = req.body
+ try {
+ console.log(req.body)
+ const userId = "636961b98d81ff3624589c3f"
+ const user = await User.findById(userId)
+ const restaurantId = req.params.restaurantId
+ const restaurant = await Restaurant.findById(restaurantId)
+ let rate = true
+ const review = req.body.review
+ if (req.body.rate === "like") {
+ rate = true
+ } else if (req.body.rate === "dislike") {
+ rate = false
+ }
+ let newRate = await Rate.create({rate, review})
+ newRate.user = user
+ newRate.restaurant = restaurant
+ res.redirect('/restaurants')
+ } catch (error) {
+ console.log(error)
+ }
+})
+
module.exports = router
\ No newline at end of file
diff --git a/Project/views/restaurants/restaurant-list.hbs b/Project/views/restaurants/restaurant-list.hbs
index 759a24e..ec5ea52 100644
--- a/Project/views/restaurants/restaurant-list.hbs
+++ b/Project/views/restaurants/restaurant-list.hbs
@@ -1,75 +1,9 @@
Restaurant List
+
{{#each dbRestaurants}}
-
- {{this.style}}
- {{this.address}}
- {{this.phonenumber}}
+
+ {{this.name}}
{{this.price}}
{{this.wifi}}
- {{this.coworking}}
- {{this.delivery}}
- {{this.instagram}}
- {{#if this.wifi}}
-
- {{/if}}
- {{/each}}
-
+{{/each}}
\ No newline at end of file
diff --git a/Project/views/restaurants/restaurantCard.hbs b/Project/views/restaurants/restaurantCard.hbs
index 886ae09..1c304b3 100644
--- a/Project/views/restaurants/restaurantCard.hbs
+++ b/Project/views/restaurants/restaurantCard.hbs
@@ -1,4 +1,4 @@
-{{#each restaurant}}
+ {{this.name}}
{{this.style}}
{{this.address}}
@@ -8,5 +8,10 @@
{{this.coworking}}
{{this.delivery}}
{{this.instagram}}
-
-{{/each}}
+
\ No newline at end of file
From 1bd6d27f46338da8d52b54e82cb6e2fa1e457efb Mon Sep 17 00:00:00 2001
From: proyectomarco
Date: Tue, 8 Nov 2022 10:20:01 +0100
Subject: [PATCH 16/20] done
---
Project/views/restaurants/restaurant-list.hbs | 71 +------------------
Project/views/restaurants/restaurantCard.hbs | 62 +++++++++++++++-
2 files changed, 62 insertions(+), 71 deletions(-)
diff --git a/Project/views/restaurants/restaurant-list.hbs b/Project/views/restaurants/restaurant-list.hbs
index 759a24e..f0259d9 100644
--- a/Project/views/restaurants/restaurant-list.hbs
+++ b/Project/views/restaurants/restaurant-list.hbs
@@ -1,75 +1,6 @@
Restaurant List
{{#each dbRestaurants}}
-
- {{this.style}}
- {{this.address}}
- {{this.phonenumber}}
- {{this.price}}
- {{this.wifi}}
- {{this.coworking}}
- {{this.delivery}}
- {{this.instagram}}
- {{#if this.wifi}}
-
- {{/if}}
+
{{/each}}
diff --git a/Project/views/restaurants/restaurantCard.hbs b/Project/views/restaurants/restaurantCard.hbs
index 886ae09..555de28 100644
--- a/Project/views/restaurants/restaurantCard.hbs
+++ b/Project/views/restaurants/restaurantCard.hbs
@@ -8,5 +8,65 @@
{{this.coworking}}
{{this.delivery}}
{{this.instagram}}
-
+{{#if this.wifi}}
+
+ {{/if}}
{{/each}}
From 5e1e80960604e9a98fdc7fbd43a67bab6b50aff5 Mon Sep 17 00:00:00 2001
From: proyectomarco
Date: Tue, 8 Nov 2022 12:22:47 +0100
Subject: [PATCH 17/20] done
---
Project/routes/restaurants.routes.js | 1 +
Project/views/restaurants/restaurantCard.hbs | 85 +++++++++++++++++---
2 files changed, 76 insertions(+), 10 deletions(-)
diff --git a/Project/routes/restaurants.routes.js b/Project/routes/restaurants.routes.js
index 1cbc091..c35ab2d 100644
--- a/Project/routes/restaurants.routes.js
+++ b/Project/routes/restaurants.routes.js
@@ -44,6 +44,7 @@ router.get("/restaurants/:restaurantId", async (req, res) => {
const restaurantId = req.params.restaurantId
try {
const restaurant = await Restaurant.findById(restaurantId)
+
res.render("restaurants/restaurantCard", restaurant)
} catch (err) {
console.log(err)
diff --git a/Project/views/restaurants/restaurantCard.hbs b/Project/views/restaurants/restaurantCard.hbs
index bbfc9b3..fa42f7f 100644
--- a/Project/views/restaurants/restaurantCard.hbs
+++ b/Project/views/restaurants/restaurantCard.hbs
@@ -1,13 +1,77 @@
- {{this.name}}
-
{{this.style}}
- {{this.address}}
- {{this.phonenumber}}
- {{this.price}}
- {{this.wifi}}
- {{this.coworking}}
- {{this.delivery}}
- {{this.instagram}}
+
+ {{name}}
+
+ {{style}}
+ {{address}}
+ {{phonenumber}}
+ {{price}}
+ {{wifi}}
+ {{coworking}}
+ {{delivery}}
+ {{instagram}}
+
+ {{#if wifi}}
+
+ {{/if}}
+
+
\ No newline at end of file
From 8d1a5bd0904c342c16cadd9508c9bf69b3fd0815 Mon Sep 17 00:00:00 2001
From: zzcugat
Date: Tue, 8 Nov 2022 12:23:26 +0100
Subject: [PATCH 18/20] petfriendly
---
Project/models/restaurant.js | 5 +
Project/views/restaurants/restaurantCard.hbs | 98 +++++++++++++++++---
2 files changed, 91 insertions(+), 12 deletions(-)
diff --git a/Project/models/restaurant.js b/Project/models/restaurant.js
index c68b735..931da21 100644
--- a/Project/models/restaurant.js
+++ b/Project/models/restaurant.js
@@ -51,6 +51,11 @@ const restaurantSchema = new Schema(
type: Boolean,
},
+ petFriendly {
+ type: Boolean,
+
+ }
+
},
{
diff --git a/Project/views/restaurants/restaurantCard.hbs b/Project/views/restaurants/restaurantCard.hbs
index d80e749..e80d53f 100644
--- a/Project/views/restaurants/restaurantCard.hbs
+++ b/Project/views/restaurants/restaurantCard.hbs
@@ -1,12 +1,86 @@
-{{#each restaurantCard}}
-
{{this.style}}
- {{this.address}}
- {{this.phonenumber}}
- {{this.price}}
- {{this.wifi}}
- {{this.coworking}}
- {{this.delivery}}
- {{this.instagram}}
-
- {{/each}}
+ {{name}}
+
+ {{style}}
+ {{address}}
+ {{phonenumber}}
+ {{price}}
+ {{wifi}}
+ {{coworking}}
+ {{delivery}}
+ {{petFriendly}}
+ {{instagram}}
+
+{{#if wifi}}
+
+ {{/if}}
+
+{{#if petFriendly}}
+{{/if}}
+
+
+
+
From b00a019bee4fec43754602bc2f0966a6aed84007 Mon Sep 17 00:00:00 2001
From: Carolina Calle
Date: Tue, 8 Nov 2022 12:28:24 +0100
Subject: [PATCH 19/20] brunch3
---
Project/models/User.model.js | 8 ++----
Project/models/rate.js | 6 ++---
Project/models/restaurant.js | 3 +++
Project/routes/restaurants.routes.js | 27 ++++++++++++-------
Project/views/restaurants/restaurant-list.hbs | 1 +
5 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/Project/models/User.model.js b/Project/models/User.model.js
index a21b0e6..d62b883 100644
--- a/Project/models/User.model.js
+++ b/Project/models/User.model.js
@@ -21,13 +21,9 @@ const userSchema = new Schema(
required: true,
},
- favorites: {
- type: [{type: Schema.Types.ObjectId, ref:"Restaurant"}]
+ rateIds: {
+ type: [{type: Schema.Types.ObjectId, ref:"Rate"}],
},
-
- admin : {
- type: Boolean
- }
},
{
// this second object adds extra properties: `createdAt` and `updatedAt`
diff --git a/Project/models/rate.js b/Project/models/rate.js
index 5d40e0a..a8e4e37 100644
--- a/Project/models/rate.js
+++ b/Project/models/rate.js
@@ -7,14 +7,14 @@ const rateSchema = new Schema(
type: {type: Schema.Types.ObjectId, ref:"User"},
},
- restaurant: {
-
+ restaurant: {
+
type: {type: Schema.Types.ObjectId, ref:"Restaurant"},
},
rate: {
- type: Boolean,
+ type: Number
},
review: {
diff --git a/Project/models/restaurant.js b/Project/models/restaurant.js
index c68b735..98568c5 100644
--- a/Project/models/restaurant.js
+++ b/Project/models/restaurant.js
@@ -51,6 +51,9 @@ const restaurantSchema = new Schema(
type: Boolean,
},
+ rateIds: {
+ type: [{type: Schema.Types.ObjectId, ref:"Rate"}],
+ },
},
{
diff --git a/Project/routes/restaurants.routes.js b/Project/routes/restaurants.routes.js
index 1cbc091..f6ff2ae 100644
--- a/Project/routes/restaurants.routes.js
+++ b/Project/routes/restaurants.routes.js
@@ -11,12 +11,22 @@ const Rate = require("../models/rate");
router.get('/restaurants' , async (req, res) => {
try {
const dbRestaurants = await Restaurant.find()
- console.log(dbRestaurants)
res.render('restaurants/restaurant-list', { dbRestaurants })
} catch (error) {
console.log(error)
}
})
+
+// Ruta creada del restaurant-list al restaurantCard
+
+router.get('/restaurants/restaurant-list' , async (req, res) => {
+ try {
+ const dbRestaurants = await Restaurant.find()
+ res.render('restaurants/restaurantCard', { dbRestaurants })
+ } catch (error) {
+ console.log(error)
+ }
+})
router.get('/create-restaurant', (req, res) => {
res.render('restaurants/restaurant-form', {options: ["Arabic", "Argentinian", "Bar", "Brazilian", "Burgers", "Chinese", "Korean",
@@ -55,21 +65,18 @@ router.get("/restaurants/:restaurantId", async (req, res) => {
const rate = req.body
try {
console.log(req.body)
- const userId = "636961b98d81ff3624589c3f"
- const user = await User.findById(userId)
+ const user = req.session.currentUser
+ const userId = user._id
const restaurantId = req.params.restaurantId
const restaurant = await Restaurant.findById(restaurantId)
- let rate = true
+ let rate = 0
const review = req.body.review
if (req.body.rate === "like") {
- rate = true
+ rate = 1
} else if (req.body.rate === "dislike") {
- rate = false
+ rate = -1
}
- let newRate = await Rate.create({rate, review})
- newRate.user = user
- newRate.restaurant = restaurant
- res.redirect('/restaurants')
+
} catch (error) {
console.log(error)
}
diff --git a/Project/views/restaurants/restaurant-list.hbs b/Project/views/restaurants/restaurant-list.hbs
index 7b2e188..7fab20e 100644
--- a/Project/views/restaurants/restaurant-list.hbs
+++ b/Project/views/restaurants/restaurant-list.hbs
@@ -2,4 +2,5 @@
{{#each dbRestaurants}}
+ Check this restaurant
{{/each}}
\ No newline at end of file
From 19ebd8f20a3af9ba143482436bfa350d54b08ea4 Mon Sep 17 00:00:00 2001
From: Carolina Calle
Date: Tue, 8 Nov 2022 16:35:52 +0100
Subject: [PATCH 20/20] rest routes update
---
Project/routes/restaurants.routes.js | 33 ++++++-
Project/views/restaurants/restaurant-list.hbs | 2 +-
Project/views/restaurants/restaurantCard.hbs | 88 ++++---------------
3 files changed, 46 insertions(+), 77 deletions(-)
diff --git a/Project/routes/restaurants.routes.js b/Project/routes/restaurants.routes.js
index facd348..b7699cf 100644
--- a/Project/routes/restaurants.routes.js
+++ b/Project/routes/restaurants.routes.js
@@ -55,21 +55,37 @@ router.get("/restaurants/:restaurantId", async (req, res) => {
try {
const restaurant = await Restaurant.findById(restaurantId)
- res.render("restaurants/restaurantCard", restaurant)
+ const counting = await Rate.find({restaurantId})
+ let likes = 0
+ let dislikes =0
+
+ counting.forEach(ele=>{
+ if(ele.rate === 1){
+ likes++
+ } else if (ele.rate ===-1){
+ dislikes++
+ }
+ }
+ )
+console.log (likes)
+
+ res.render("restaurants/restaurantCard", {restaurant, likes, dislikes} )
} catch (err) {
console.log(err)
}
})
- router.post('/restaurants/:restaurantId', async (req, res) => {
- const rate = req.body
+ router.post('/restaurants/:restaurantId', isLoggedIn, async (req, res) => {
try {
- console.log(req.body)
const user = req.session.currentUser
+ console.log("This is the user", user)
const userId = user._id
+ console.log("This is the userId", userId)
const restaurantId = req.params.restaurantId
+
const restaurant = await Restaurant.findById(restaurantId)
+ console.log("This is the restaurantId", restaurant)
let rate = 0
const review = req.body.review
if (req.body.rate === "like") {
@@ -77,6 +93,15 @@ router.get("/restaurants/:restaurantId", async (req, res) => {
} else if (req.body.rate === "dislike") {
rate = -1
}
+
+
+
+ let newRate = await Rate.create({rate, review, userId, restaurantId})
+ await User.findByIdAndUpdate(userId,{ $push: { rateIds: userId } })
+
+ await Restaurant.findByIdAndUpdate(restaurantId,{ $push: { rateIds: restaurantId } })
+
+ res.redirect('/restaurants')
} catch (error) {
console.log(error)
diff --git a/Project/views/restaurants/restaurant-list.hbs b/Project/views/restaurants/restaurant-list.hbs
index 7fab20e..16cb7ba 100644
--- a/Project/views/restaurants/restaurant-list.hbs
+++ b/Project/views/restaurants/restaurant-list.hbs
@@ -2,5 +2,5 @@
{{#each dbRestaurants}}
- Check this restaurant
+ Check this restaurant
{{/each}}
\ No newline at end of file
diff --git a/Project/views/restaurants/restaurantCard.hbs b/Project/views/restaurants/restaurantCard.hbs
index 690f7d6..1f5a261 100644
--- a/Project/views/restaurants/restaurantCard.hbs
+++ b/Project/views/restaurants/restaurantCard.hbs
@@ -1,83 +1,27 @@
- {{name}}
+ {{restaurant.name}}
-
- {{style}}
- {{address}}
- {{phonenumber}}
- {{price}}
- {{wifi}}
- {{coworking}}
- {{delivery}}
-
- {{/if}}
+ {{likes}}
+
+ {{restaurant.style}}
+ {{restaurant.address}}
+ {{restaurant.phonenumber}}
+ {{restaurant.price}}
+ {{restaurant.wifi}}
+ {{restaurant.coworking}}
+ {{restaurant.petfriendly}}
+ {{restaurant.delivery}}
+
+
-