Parcourir la source

Update for re-deploy

Lee Morgan il y a 2 ans
Parent
commit
19341212d6

+ 0 - 1
app.js

@@ -55,7 +55,6 @@ if(process.env.NODE_ENV === "production"){
         }
     });
 
-    sessionOptions.domain = process.env.COOKIE_DOMAIN;
     sessionOptions.secure = true;
     cssOptions.minimize = true;
     mongooseOptions.auth = {authSource: "admin"};

+ 4 - 3
controllers/emailVerification.js

@@ -13,16 +13,16 @@ module.exports = {
 
                 return axios({
                     method: "post",
-                    url: `https://api.mailgun.net/v3/mail.thesubline.net/messages`,
+                    url: `https://api.mailgun.net/v3/mg.leemorgan.dev/messages`,
                     headers: {
                         "Content-Type": "application/x-www-form-urlencoded"
                     },
                     auth: {
                         username: "api",
-                        password: process.env.MG_SUBLINE_APIKEY
+                        password: process.env.SUBLINE_MAILGUN_API
                     },
                     data: queryString.stringify({
-                        from: "The Subline <clientsupport@thesubline.net>",
+                        from: "The Subline <subline@leemorgan.dev>",
                         to: owner.email,
                         subject: "The Subline Email Verification",
                         html: verifyEmail({
@@ -36,6 +36,7 @@ module.exports = {
                 return res.render(`verifyPage/verify`, {id: saveOwner._id, email: saveOwner.email, banner: res.locals.merchant});
             })
             .catch((err)=>{
+                console.error(err);
                 req.session.error = "ERROR: UNABLE TO SEND VERIFICATION EMAIL";
                 return res.redirect("/");
             });

+ 2 - 2
controllers/merchantData.js

@@ -257,10 +257,10 @@ module.exports = {
                 },
                 auth: {
                     username: "api",
-                    password: process.env.MG_SUBLINE_APIKEY
+                    password: process.env.SUBLINE_MAILGUN_API
                 },
                 data: queryString.stringify({
-                    from: "The Subline <clientsupport@thesubline.net>",
+                    from: "The Subline <subline@leemorgan.dev>",
                     to: res.locals.owner.email,
                     subject: "The Subline Email Verification",
                     html: verifyEmail({

+ 3 - 3
controllers/passwordReset.js

@@ -21,16 +21,16 @@ module.exports = {
 
                 axios({
                     method: "post",
-                    url: "https://api.mailgun.net/v3/mail.thesubline.net/messages",
+                    url: "https://api.mailgun.net/v3/mg.leemorgan.dev/messages",
                     headers: {
                         "Content-Type": "application/x-www-form-urlencoded"
                     },
                     auth: {
                         username: "api",
-                        password: process.env.MG_SUBLINE_APIKEY
+                        password: process.env.SUBLINE_MAILGUN_API
                     },
                     data: queryString.stringify({
-                        from: "The Subline <clientsupport@thesubline.net>",
+                        from: "The Subline <subline@leemorgan.dev>",
                         to: owner.email,
                         subject: "Password Reset for The Subline",
                         html: passwordReset({

+ 23 - 23
views/dashboardPage/dashboard.ejs

@@ -10,7 +10,7 @@
         <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
     </head>
     <body>
-        <% include ./ejs/menu.ejs %>
+        <%- include("./ejs/menu.ejs") %>
 
         <div id="mobileMenuSelector" class="mobileMenuSelector" onclick="controller.openMenu()">&#8801;</div>
 
@@ -22,34 +22,34 @@
         </button>
 
         <div class="contentBlock">
-            <%include ./ejs/banner.ejs %>
+            <%- include("./ejs/banner.ejs") %>
             
-            <% include ./ejs/strands/home.ejs %>
-            <% include ./ejs/strands/ingredients.ejs %>
-            <% include ./ejs/strands/recipeBook.ejs %>
-            <% include ./ejs/strands/analytics.ejs %>
-            <% include ./ejs/strands/orders.ejs %>
-            <% include ./ejs/strands/transactions.ejs %>
-            <% include ./ejs/strands/account.ejs %>
+            <%- include("./ejs/strands/home.ejs") %>
+            <%- include("./ejs/strands/ingredients.ejs") %>
+            <%- include("./ejs/strands/recipeBook.ejs") %>
+            <%- include("./ejs/strands/analytics.ejs") %>
+            <%- include("./ejs/strands/orders.ejs") %>
+            <%- include("./ejs/strands/transactions.ejs") %>
+            <%- include("./ejs/strands/account.ejs") %>
         </div>
 
         <div id="sidebarDiv" class="sidebarHide">
-            <% include ./ejs/sidebars/newIngredient %>
-            <% include ./ejs/sidebars/ingredientDetails %>
-            <% include ./ejs/sidebars/editIngredient %>
-            <% include ./ejs/sidebars/recipeDetails %>
-            <% include ./ejs/sidebars/newRecipe %>
-            <% include ./ejs/sidebars/orderDetails %>
-            <% include ./ejs/sidebars/newOrder %>
-            <% include ./ejs/sidebars/transactionDetails %>
-            <% include ./ejs/sidebars/newTransaction %>
-            <% include ./ejs/sidebars/editRecipe %>
-            <% include ./ejs/sidebars/orderFilter %>
-            <% include ./ejs/sidebars/transactionFilter %>
+            <%- include("./ejs/sidebars/newIngredient") %>
+            <%- include("./ejs/sidebars/ingredientDetails") %>
+            <%- include("./ejs/sidebars/editIngredient") %>
+            <%- include("./ejs/sidebars/recipeDetails") %>
+            <%- include("./ejs/sidebars/newRecipe") %>
+            <%- include("./ejs/sidebars/orderDetails") %>
+            <%- include("./ejs/sidebars/newOrder") %>
+            <%- include("./ejs/sidebars/transactionDetails") %>
+            <%- include("./ejs/sidebars/newTransaction") %>
+            <%- include("./ejs/sidebars/editRecipe") %>
+            <%- include("./ejs/sidebars/orderFilter") %>
+            <%- include("./ejs/sidebars/transactionFilter") %>
         </div>
 
-        <% include ../shared/loader %>
-        <% include ./ejs/modal.ejs %>
+        <%- include("../shared/loader") %>
+        <%- include("./ejs/modal.ejs") %>
 
         <script>
             let data = {

+ 1 - 16
views/dashboardPage/ejs/strands/account.ejs

@@ -33,22 +33,7 @@
                 <div class="newLocationButtons">
                     <h1>NEW:</h1>
 
-                    <button id="newMerchantSquareButton" type="button">
-                        <svg aria-hidden="true" viewBox="0 0 44 44" width="21" height="21">
-                            <path fill="currentColor" d="M36.65 0H7.354A7.354 7.354 0 0 0 0 7.354V36.65a7.354 7.354 0 0 0 7.354 7.354H36.65a7.353 7.353 0 0 0 7.354-7.354V7.354A7.352 7.352 0 0 0 36.65 0zm-.646 33.685a2.32 2.32 0 0 1-2.32 2.32H10.325a2.32 2.32 0 0 1-2.321-2.32v-23.36a2.32 2.32 0 0 1 2.321-2.321h23.359a2.32 2.32 0 0 1 2.32 2.321v23.36z"></path>
-                            <path fill="currentColor" d="M17.333 28.003c-.736 0-1.332-.6-1.332-1.339V17.34c0-.739.596-1.339 1.332-1.339h9.338c.738 0 1.332.6 1.332 1.339v9.324c0 .739-.594 1.339-1.332 1.339h-9.338z"></path>
-                        </svg>
-                        <svg aria-hidden="true" viewBox="0 0 66 22" width="75" height="21">
-                            <path d="M11.2 10c-.7-.2-1.3-.4-1.8-.6C8.4 9 8 8.4 8 7.6c0-1.5 1.5-2.2 3-2.2 1.4 0 2.6.6 3.5 1.6l.1.1 1.2-.9-.1-.1c-1.1-1.4-2.7-2.2-4.6-2.2-1.2 0-2.4.3-3.2.9-1 .8-1.5 1.7-1.5 2.9 0 2.7 2.6 3.4 4.6 3.9 2.1.6 3.4 1 3.4 2.6s-1.3 2.6-3.2 2.6c-1 0-2.8-.3-3.9-2l-.1-.1-1.2.9v.1c1.1 1.6 2.9 2.5 5.1 2.5 2.9 0 4.9-1.6 4.9-4.1 0-2.8-2.7-3.5-4.8-4.1z" fill="currentColor"></path>
-                            <path d="M25.5 9.5V8h1.4v14h-1.4v-5.5c-.8 1.1-2 1.7-3.4 1.7-2.7 0-4.5-2.1-4.5-5.2s1.9-5.2 4.5-5.2c1.4-.1 2.6.6 3.4 1.7zM19.1 13c0 2.9 1.6 3.9 3.2 3.9 2 0 3.3-1.5 3.3-3.9s-1.3-3.9-3.3-3.9c-2.4 0-3.2 2-3.2 3.9z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"></path>
-                            <path d="M36.2 8v5.5c0 1.9-1.3 3.3-3.2 3.3-1.5 0-2.3-.9-2.3-2.8V8h-1.4v6.4c0 2.4 1.3 3.8 3.5 3.8 1.4 0 2.5-.6 3.3-1.6V18h1.4V8h-1.3z" fill="currentColor"></path>
-                            <path d="M40.3 9c1-.8 2.4-1.3 3.9-1.3 2.2 0 3.6 1.1 3.6 3V18h-1.4v-1.1c-.7.9-1.7 1.3-3.1 1.3-2.2 0-3.5-1.2-3.5-3.1 0-2.5 2.3-2.8 3.3-3 .2 0 .3-.1.5-.1 1.4-.2 2.7-.4 2.7-1.6 0-1.3-1.7-1.4-2.2-1.4-.9 0-2.2.3-3.1 1v.2L40.3 9zm.9 6.1c0 1.6 1.5 1.8 2.2 1.8 1.4 0 2.9-.8 2.9-2.9v-1.4c-.7.4-1.7.6-2.5.8l-.4.1c-1.5.1-2.2.5-2.2 1.6z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"></path>
-                            <path d="M55.9 8.2c-.3-.2-.9-.4-1.4-.4-1.1 0-2.2.6-2.8 1.5V8h-1.4v10h1.4v-5.4c0-2.4 1.3-3.4 2.7-3.4.4 0 .8.1 1.1.2l.1.1.3-1.3z" fill="currentColor"></path>
-                            <path d="M56.3 13c0-3.1 1.9-5.3 4.7-5.3 2.7 0 4.5 1.9 4.5 4.7V13.2h-7.7c0 2.2 1.4 3.6 3.4 3.6 1.2 0 2.2-.5 2.8-1.3l.1-.1 1 .9-.1.1c-.7.8-1.9 1.8-3.9 1.8-2.9 0-4.8-2.1-4.8-5.2zm4.6-3.9c-1.7 0-2.9 1.1-3.1 2.9H64c-.1-1.4-1-2.9-3.1-2.9z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"></path>
-                        </svg>
-                    </button>
-
-                    <button id="settingsAddMerchant" class="button">NO POS</button>
+                    <button id="settingsAddMerchant" class="button">CREATE</button>
                 </div>
             </div>
 

+ 3 - 3
views/otherPages/landing.ejs

@@ -27,7 +27,7 @@
             </div>
         </div>
 
-        <% include ../shared/banner.ejs %>
+        <%- include("../shared/banner.ejs"); %>
 
         <div class="main-background">
             <div class="logo-text">
@@ -58,7 +58,7 @@
             </ul>
         </div>
 
-        <% include ../shared/loader %>
+        <%- include("../shared/loader"); %>
 
         <script>
             let locals = <%- JSON.stringify(locals) %>
@@ -108,4 +108,4 @@
             }
         </script>
     </body>
-</html>
+</html>

+ 2 - 2
views/otherPages/login.ejs

@@ -15,7 +15,7 @@
             </a>
         </div>
 
-        <% include ../shared/banner.ejs %>
+        <%- include("../shared/banner.ejs") %>
 
         <form action="/login" method="post">
             <h1> Welcome Back </h1>
@@ -35,7 +35,7 @@
             <a href="/register">Need to register?</a>
         </form>
 
-        <% include ../shared/footer %>
+        <%- include("../shared/footer") %>
 
         <script>
             let locals = <%- JSON.stringify(locals) %>

+ 4 - 19
views/otherPages/register.ejs

@@ -15,9 +15,9 @@
             </a>
         </div>
 
-        <% include ../shared/banner.ejs %>
+        <%- include("../shared/banner.ejs") %>
 
-        <form method="post">
+        <form method="post" action="/merchant/create/none">
             <h1> Join The Subline </h1>
 
             <label id="nameLabel">Restaurant Name
@@ -47,27 +47,12 @@
 
             <h2 class="customText">SIGN UP WITH:</h2>
 
-            <button id="squareButton" class="button" formaction="/squarelogin">
-                <svg aria-hidden="true" viewBox="0 0 44 44" width="30" height="30">
-                    <path fill="currentColor" d="M36.65 0H7.354A7.354 7.354 0 0 0 0 7.354V36.65a7.354 7.354 0 0 0 7.354 7.354H36.65a7.353 7.353 0 0 0 7.354-7.354V7.354A7.352 7.352 0 0 0 36.65 0zm-.646 33.685a2.32 2.32 0 0 1-2.32 2.32H10.325a2.32 2.32 0 0 1-2.321-2.32v-23.36a2.32 2.32 0 0 1 2.321-2.321h23.359a2.32 2.32 0 0 1 2.32 2.321v23.36z"></path>
-                    <path fill="currentColor" d="M17.333 28.003c-.736 0-1.332-.6-1.332-1.339V17.34c0-.739.596-1.339 1.332-1.339h9.338c.738 0 1.332.6 1.332 1.339v9.324c0 .739-.594 1.339-1.332 1.339h-9.338z"></path>
-                </svg>
-                <svg aria-hidden="true" viewBox="0 0 66 22" width="75" height="25">
-                    <path d="M11.2 10c-.7-.2-1.3-.4-1.8-.6C8.4 9 8 8.4 8 7.6c0-1.5 1.5-2.2 3-2.2 1.4 0 2.6.6 3.5 1.6l.1.1 1.2-.9-.1-.1c-1.1-1.4-2.7-2.2-4.6-2.2-1.2 0-2.4.3-3.2.9-1 .8-1.5 1.7-1.5 2.9 0 2.7 2.6 3.4 4.6 3.9 2.1.6 3.4 1 3.4 2.6s-1.3 2.6-3.2 2.6c-1 0-2.8-.3-3.9-2l-.1-.1-1.2.9v.1c1.1 1.6 2.9 2.5 5.1 2.5 2.9 0 4.9-1.6 4.9-4.1 0-2.8-2.7-3.5-4.8-4.1z" fill="currentColor"></path>
-                    <path d="M25.5 9.5V8h1.4v14h-1.4v-5.5c-.8 1.1-2 1.7-3.4 1.7-2.7 0-4.5-2.1-4.5-5.2s1.9-5.2 4.5-5.2c1.4-.1 2.6.6 3.4 1.7zM19.1 13c0 2.9 1.6 3.9 3.2 3.9 2 0 3.3-1.5 3.3-3.9s-1.3-3.9-3.3-3.9c-2.4 0-3.2 2-3.2 3.9z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"></path>
-                    <path d="M36.2 8v5.5c0 1.9-1.3 3.3-3.2 3.3-1.5 0-2.3-.9-2.3-2.8V8h-1.4v6.4c0 2.4 1.3 3.8 3.5 3.8 1.4 0 2.5-.6 3.3-1.6V18h1.4V8h-1.3z" fill="currentColor"></path>
-                    <path d="M40.3 9c1-.8 2.4-1.3 3.9-1.3 2.2 0 3.6 1.1 3.6 3V18h-1.4v-1.1c-.7.9-1.7 1.3-3.1 1.3-2.2 0-3.5-1.2-3.5-3.1 0-2.5 2.3-2.8 3.3-3 .2 0 .3-.1.5-.1 1.4-.2 2.7-.4 2.7-1.6 0-1.3-1.7-1.4-2.2-1.4-.9 0-2.2.3-3.1 1v.2L40.3 9zm.9 6.1c0 1.6 1.5 1.8 2.2 1.8 1.4 0 2.9-.8 2.9-2.9v-1.4c-.7.4-1.7.6-2.5.8l-.4.1c-1.5.1-2.2.5-2.2 1.6z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"></path>
-                    <path d="M55.9 8.2c-.3-.2-.9-.4-1.4-.4-1.1 0-2.2.6-2.8 1.5V8h-1.4v10h1.4v-5.4c0-2.4 1.3-3.4 2.7-3.4.4 0 .8.1 1.1.2l.1.1.3-1.3z" fill="currentColor"></path>
-                    <path d="M56.3 13c0-3.1 1.9-5.3 4.7-5.3 2.7 0 4.5 1.9 4.5 4.7V13.2h-7.7c0 2.2 1.4 3.6 3.4 3.6 1.2 0 2.2-.5 2.8-1.3l.1-.1 1 .9-.1.1c-.7.8-1.9 1.8-3.9 1.8-2.9 0-4.8-2.1-4.8-5.2zm4.6-3.9c-1.7 0-2.9 1.1-3.1 2.9H64c-.1-1.4-1-2.9-3.1-2.9z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"></path>
-                </svg>
-            </button>
-
-            <button id="noneButton" class="submitButton" class="button" formaction="/merchant/create/none">NO POS</button>
+            <button id="noneButton" class="submitButton" class="button">NO POS</button>
 
             <a href="/login">Already have an account? Please Sign In</a>
         </form>
 
-        <% include ../shared/footer %>
+        <%- include("../shared/footer") %>
 
         <script>
             let locals = <%- JSON.stringify(locals) %>

+ 1 - 1
views/passwordResetPages/password.ejs

@@ -9,7 +9,7 @@
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
     </head>
     <body>
-        <% include ../shared/banner.ejs %>
+        <%- include("../shared/banner.ejs") %>
         
         <form action="/reset" method="post">
             <h1>RESET PASSWORD:</h1>

+ 1 - 1
views/verifyPage/verify.ejs

@@ -9,7 +9,7 @@
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
     </head>
     <body>
-        <% include ../shared/banner.ejs %>
+        <%- include("../shared/banner.ejs") %>
         
         <form action="/verify/resend" method="post">
             <h3>An email has been sent to <%=email%>. Use the link in the email to verify your account.</h3>