Friendship Accepted and Refused (notification updated)

This commit is contained in:
Paolo Arena
2022-07-27 20:56:01 +02:00
parent 3515914f17
commit 50c6031789
10 changed files with 151 additions and 49 deletions

View File

@@ -26,7 +26,7 @@ const isValidSaveRequest = (req, res) => {
}
};
router.post('/', authenticate, (req, res) => {
router.post('/', authenticate, async (req, res) => {
// console.log('req.body.others', req.body.others);
if (!isValidSaveRequest(req, res)) {
@@ -39,7 +39,7 @@ router.post('/', authenticate, (req, res) => {
subscriptionModel.browser = req.get('User-Agent');
// Find if already exist
Subscription.findOne({
await Subscription.findOne({
userId: subscriptionModel.userId,
access: subscriptionModel.access,
browser: subscriptionModel.browser,