This file contains 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
export default (sequelize, DataTypes) => { | |
const Users = sequelize.define('Users', { | |
username: { | |
allowNull: false, | |
type: DataTypes.STRING, | |
unique: true, | |
validate: { | |
notEmpty: true | |
} | |
}, |
This file contains 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
... | |
fetchMe(req, res) { | |
const username = req.decoded.data; | |
return models.Users | |
.find({ | |
include: [{ | |
model: models.Groups, | |
as: 'groups', | |
required: false, |
This file contains 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
{ | |
"id": 1, | |
"username": "John", | |
"phone": "xxxxxxxxx", | |
"email": "John@email.com", | |
"createdAt": "2017-07-16T20:14:04.744Z", | |
"updatedAt": "2017-07-16T20:14:04.744Z", | |
"groups": [ | |
{ | |
"id": 2, |
This file contains 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
alert('Hello Human'); | |
alert('You shall die'); |
This file contains 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
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { connect } from 'react-redux'; | |
import { Link } from 'react-router-dom'; | |
import { Form } from './Form'; | |
import { | |
apiFetchGroup, | |
apiSearch, | |
apiUpdateMembers, | |
stopSearch } from '../../actions/'; |
This file contains 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
// Hello M |
This file contains 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
const mimeType = 'text/plain'; | |
const filename = JSON.parse(localStorage.getItem('pads'))[JSON.parse(localStorage.getItem('selected_pad')).id].content.substring(0,8) | |
const elId = "typing" | |
const elHtml = document.getElementById(elId).innerHTML; | |
if (navigator.msSaveBlob) { | |
navigator.msSaveBlob(new Blob([elHtml], { type: mimeType + ';charset=utf-8;' }), filename); | |
} else { | |
const link = document.createElement('a'); | |
link.setAttribute('download', filename); |
This file contains 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
"scripts": { | |
"parcel:dev": "./node_modules/.bin/parcel index.html", | |
"parcel:watch": "./node_modules/.bin/parcel watch index.html", | |
"parcel:build": "./node_modules/.bin/parcel build index.html" | |
} |
This file contains 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
import { module, test } from 'qunit'; | |
import { visit, currentURL } from '@ember/test-helpers'; | |
import { setupApplicationTest } from 'ember-qunit'; | |
module('Acceptance | simple form', function(hooks) { | |
setupApplicationTest(hooks); | |
test('visiting /simple-form', async function(assert) { | |
await visit('/simple-form'); |
OlderNewer