Skip to content

Instantly share code, notes, and snippets.

{ SequelizeValidationError: notNull Violation: Post.userId cannot be null
at Promise.all.then (/Users/nickchang/work/thinkful/tc/donovanky/bloccit/node_modules/sequelize/lib/instance-validator.js:74:15)
at tryCatcher (/Users/nickchang/work/thinkful/tc/donovanky/bloccit/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/nickchang/work/thinkful/tc/donovanky/bloccit/node_modules/bluebird/js/release/promise.js:517:31)
at Promise._settlePromise (/Users/nickchang/work/thinkful/tc/donovanky/bloccit/node_modules/bluebird/js/release/promise.js:574:18)
at Promise._settlePromise0 (/Users/nickchang/work/thinkful/tc/donovanky/bloccit/node_modules/bluebird/js/release/promise.js:619:10)
at Promise._settlePromises (/Users/nickchang/work/thinkful/tc/donovanky/bloccit/node_modules/bluebird/js/release/promise.js:699:18)
at Promise._fulfill (/Users/nickchang/work/thinkful/tc/donovanky/bloccit/node_modules/bluebird/js/release/promise.js:643:18)
at PromiseAr
function updateQuestion() {
const quizQuestions = `<section class='question'>
<form>
<h4>${questionNumber}<span>/7 - Question Number</span></h4>
<h4>${score}<span>/49 - Score</span></h4>
<h2>${QUESTIONS[questionNumber].question}</h2>
<label>
<input type='radio' id='r1' name='forRadio1' class='rdo' value='${QUESTIONS[questionNumber].choice1}' >${QUESTIONS[questionNumber].choice1}
</label>
<label>
import React, { Component } from 'react';
import { Button, Input } from '../Utils/Utils';
import config from '../../config'
import TokenService from '../../services/token-service';
import { Link } from 'react-router-dom';
export default class LoginForm extends Component {
static defaultProps = {
onLoginSuccess: () => { }
};
// import $ from 'jquery';
import store from './store.js';
import bookmarklist from './bookmarklist.js';
import api from './api.js';
import './styles/index.css';
const main = function () {
console.log('main start')
function renderTheParks(responseJson){
console.log(responseJson)
for (let i = 0; i < responseJson.data.length; i++){
let imageURL = null;
if(responseJson.data[i].images.length > 0){
imageURL = `'${responseJson.data[i].images[0].url}'`;
}
$(".parks").append(
`<div>
handleSubmitJwtAuth = (e) => {
e.preventDefault()
const { username, password } = this.state
const user = { username, password }
fetch(`${config.API_ENDPOINT}/auth/login`, {
method: 'POST',
headers: {
'content-type': 'application/json'
import React from 'react';
import './App.css';
import List from './List';
function App(props) {
const { store } = props;
import React from 'react';
import Card from './Card';
function List (props) {
const { header, listCards, } = props;
const individualCards = listCards.map((card) => {
return <Card cardTitle={card.title} cardContent={card.content} />;
});
C:\code\thinkful\tc\alyrlee\4.10-bookmarks-server>npm start
> express-boilerplate-project@1.0.0 start C:\code\thinkful\tc\alyrlee\4.10-bookmarks-server
> node src/server.js
internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module './bookmarks/bookmarks-router'
{
"version": 2,
"alias": "<your app alias>",
"name": "<your app name>",
"routes": [
{ "handle": "filesystem" },
{ "src": "/.*", "dest": "/index.html" }
]
}