Browse Source

added icons to notifications

master
arnaucode 6 years ago
parent
commit
73c386ff7f
5 changed files with 23 additions and 16 deletions
  1. +14
    -7
      README.md
  2. +0
    -1
      config.js
  3. +5
    -5
      controllers/travelController.js
  4. +2
    -2
      controllers/userController.js
  5. +2
    -1
      models/notificationModel.js

+ 14
- 7
README.md

@ -1,15 +1,25 @@
# CarsInCommonServer
frontend app code: https://github.com/idoctnef/carsincommonApp
images server: https://github.com/arnaucode/goImgServer
- frontend app code: https://github.com/arnaucode/carsincommonApp
- images server: https://github.com/arnaucode/goImgServer
**Backend:**
Nodejs + Express + MongoDB
- Nodejs + Express + MongoDB
- Go --> for the images server
**Frontend:**
Angularjs + Ionic + MaterialDesign
- Angularjs + Ionic
App:
![carsincommon](https://raw.githubusercontent.com/arnaucode/carsincommonApp/master/carsincommon.png "carsincommon")
code: https://github.com/arnaucode/carsincommonApp
--------------------
**To Do Backend and Frontend:**
@ -19,9 +29,6 @@ images server: https://github.com/arnaucode/goImgServer
```
--------------------
#### RESOURCES using:
initial avatars users: [http://www.flaticon.com/packs/animal-icon-collection](http://www.flaticon.com/packs/animal-icon-collection)

+ 0
- 1
config.js

@ -5,5 +5,4 @@ module.exports = {
'database': 'mongodb://localhost/carsincommon',
"port" : process.env.PORT || 3000,
"pageSize": 20
};

+ 5
- 5
controllers/travelController.js

@ -153,7 +153,7 @@ exports.addJoinPetition = function(req, res) {
concept: "join",
message: "user "+userJoining.username+" joins your travel "+travel.title,
date: new Date(),
icon: 'join.png',
icon: 'ion-person-add',
link: "travels/" + travel._id,
user: user._id
});
@ -212,7 +212,7 @@ exports.unJoin = function(req, res) {
concept: "unjoin",
message: "user "+userJoining.username+" unjoins your travel "+travel.title,
date: new Date(),
icon: 'unjoin.png',
icon: 'ion-arrow-return-left',
link: "travels/" + travel._id,
user: user._id
});
@ -281,7 +281,7 @@ exports.declineJoin = function(req, res) {
concept: "travel",
message: "user "+userOwner.username+" declines your petition for "+travel.title,
date: new Date(),
icon: 'travel.png',
icon: 'ion-close',
link: "travels/" + travel._id,
user: user._id
});
@ -350,7 +350,7 @@ exports.acceptJoin = function(req, res) {
concept: "travel",
message: "user "+userOwner.username+" accepts your petition for "+travel.title,
date: new Date(),
icon: 'travel.png',
icon: 'ion-checkmark',
link: "travels/" + travel._id,
user: user._id
});
@ -409,7 +409,7 @@ exports.leave = function(req, res) {
concept: "leave",
message: "user "+userLeaving.username+" leaves your travel "+travel.title,
date: new Date(),
icon: 'leave.png',
icon: 'ion-log-out',
link: "travels/" + travel._id,
user: user._id
});

+ 2
- 2
controllers/userController.js

@ -418,7 +418,7 @@ exports.likeUser = function(req, res) {
concept: "like",
message: "user " + userL.username + " adds a like to you",
date: new Date(),
icon: 'like.png',
icon: 'ion-heart',
link: "users/" + user._id,
user: user._id
});
@ -469,7 +469,7 @@ exports.unlikeUser = function(req, res) {
concept: "like",
message: "user " + userL.username + " removes like on you",
date: new Date(),
icon: 'like.png',
icon: 'ion-heart-broken',
link: "users/" + user._id,
user: user._id
});

+ 2
- 1
models/notificationModel.js

@ -14,7 +14,8 @@ var notificationSchema = new Schema({
message: {type: String},
link: {type: String},//aquí oju, a la app i a la web calen links diferents
date: {type: Date},
dateviewed: {type: Date}
dateviewed: {type: Date},
icon: {type: String}
})
notificationSchema.plugin(mongooseUniqueValidator);

Loading…
Cancel
Save