This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Express Middleware built to convert all incoming request body data to snake_case | |
| // Requires npm install lodash | |
| const { snakeCase } = require("lodash") | |
| const snakeCaseKeys = (data) => { | |
| // check to see if req.body is an array. | |
| if (Array.isArray(data)) { | |
| // if Array, map() through all objects in Array. | |
| return data.map((object) => snakeCaseKeys(object)) | |
| } else if (data !== null && data.constructor === Object) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <title>Orchid Eats - Construction Mode</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = angular.module("modalFormApp", ['ui.bootstrap']); | |
| app.controller("modalAccountFormController", ['$scope', '$modal', '$log', | |
| function ($scope, $modal, $log) { | |
| $scope.showForm = function () { | |
| $scope.message = "Show Form Button Clicked"; | |
| console.log($scope.message); | |
| var modalInstance = $modal.open({ |