TYPE: POST | GET
Import moment timezone and lodash
import moment from 'moment-timezone';
import _ from 'lodash';
The website encountered an unexpected error. Please try again later. | |
Error: Call to undefined method Drupal\Core\Utility\Error::logException() in Drupal\sdc\Twig\TwigComponentLoader->exists() (line 79 of modules/contrib/sdc/src/Twig/TwigComponentLoader.php). | |
// This error means that the template doesn't exists. Check the component name, sometimes your are calling in the different module/theme name ex. module_name:component_name. |
From: https://gist.github.com/stongo/6359042 | |
Commented By: geraldanosike commented on Jul 24 | |
// ******************************** | |
// User Model | |
// ******************************** | |
const mongoose = require('mongoose') | |
const Joi = require('joi') | |
const userSchema = new mongoose.Schema({ |
if ($("body").hasClass("page-user-patron")) { | |
function urlParam(name) { | |
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); | |
if (results == null){ | |
return null; | |
} | |
else { | |
return decodeURI(results[1]) || 0; | |
} | |
} |
//********************************************** | |
// Get all documents | |
//********************************************** | |
router.get('/', async function(req, res, next) { | |
const title = 'Boozeyum'; | |
let cityRef = await db.collection('cities'); | |
const data = []; | |
let getDoc = await cityRef.get() | |
.then(snapshot => { | |
snapshot.docs.forEach(doc => { |
news_articles.info.yml | |
news_articles.libraries.yml | |
news_articles.module |
const snapPromise = db.ref('bars') | |
.once('value') | |
const snap = await snapPromise | |
const value = snap.val() | |
// do something with value... | |
// same thing | |
const value = await db | |
.ref('bars') |
$block = module_invoke('hf_stacks_search', 'block_view', 'hf_stacks_search_block'); | |
print render($block['content']); |
$custom_theme = variable_get('theme_default'); | |
dpm($custom_theme); | |
var center = new google.maps.LatLng(53.5557957,-113.6340293); | |
var options = { | |
'zoom': 9, | |
'center': center, | |
'mapTypeId': google.maps.MapTypeId.ROADMAP, | |
'disableDoubleClickZoom': false, | |
}; | |
var map = new google.maps.Map(document.getElementById("map"), options); | |
var markers = []; | |
} |