Skip to content

Commit

Permalink
fix: Fix server error (#32)
Browse files Browse the repository at this point in the history
georgegillams authored Dec 2, 2023
1 parent ad11af5 commit bf41862
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion server/api/actions/happy-hour/query.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { utcToZonedTime } from 'date-fns-tz';
import timeZones from './time-zones.json';
import { isHappyHour } from 'helpers/happy-hour';

const formatPlace = place => place.split('_').join(' ');
const formatPlace = place => place && place.split('_').join(' ');

const formatLocation = timeZone => {
const timeZoneSplit = timeZone.split('/');
9 changes: 4 additions & 5 deletions server/utils/common/logger.js
Original file line number Diff line number Diff line change
@@ -6,16 +6,15 @@ const divider = chalk.gray('\n-----------------------------------');
/**
* Logger middleware, you can customize it to make messages more personal
*/

const logger = {
// Called whenever there's output from the server we want to print
log: message => {
console.log(message);
log: (message, ...rest) => {
console.log(message, ...rest);
},

// Called whenever there's an error on the server we want to print
error: err => {
console.error(chalk.red(err));
error: (err, ...rest) => {
console.error(chalk.red(err), ...rest);
},

// Called when express.js app starts on given port w/o errors
Original file line number Diff line number Diff line change
@@ -103,10 +103,10 @@ exports[`<Status /> should render correctly 1`] = `
/>
<br />
Built
over 52 years ago
over 53 years ago
<br />
Started
over 52 years ago
over 53 years ago
<br />
Environment
test-node-env

0 comments on commit bf41862

Please sign in to comment.