Przeglądaj źródła

fix going to shortened URLs

Pouria Ezzati 8 lat temu
rodzic
commit
ab64572a47
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      server/controllers/urlController.js

+ 2 - 2
server/controllers/urlController.js

@@ -112,11 +112,11 @@ exports.goToUrl = async (req, res, next) => {
   if (url.user) {
   if (url.user) {
     await createVisit({
     await createVisit({
       browser,
       browser,
-      country,
+      country: country || 'Unknown',
       domain,
       domain,
       id: url.id,
       id: url.id,
       os,
       os,
-      referrer,
+      referrer: referrer || 'Direct',
     });
     });
   }
   }
   return res.redirect(url.target);
   return res.redirect(url.target);