chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@ -1,66 +1,66 @@
// @flow
import { User, Document, Collection, Team } from '../models';
import { sequelize } from '../sequelize';
import { User, Document, Collection, Team } from "../models";
import { sequelize } from "../sequelize";
export function flushdb() {
const sql = sequelize.getQueryInterface();
const tables = Object.keys(sequelize.models).map(model => {
const n = sequelize.models[model].getTableName();
return sql.quoteTable(typeof n === 'string' ? n : n.tableName);
return sql.quoteTable(typeof n === "string" ? n : n.tableName);
});
const query = `TRUNCATE ${tables.join(', ')} CASCADE`;
const query = `TRUNCATE ${tables.join(", ")} CASCADE`;
return sequelize.query(query);
}
const seed = async () => {
const team = await Team.create({
id: '86fde1d4-0050-428f-9f0b-0bf77f8bdf61',
name: 'Team',
slackId: 'T2399UF2P',
id: "86fde1d4-0050-428f-9f0b-0bf77f8bdf61",
name: "Team",
slackId: "T2399UF2P",
slackData: {
id: 'T2399UF2P',
id: "T2399UF2P",
},
});
const admin = await User.create({
id: 'fa952cff-fa64-4d42-a6ea-6955c9689046',
email: 'admin@example.com',
username: 'admin',
name: 'Admin User',
id: "fa952cff-fa64-4d42-a6ea-6955c9689046",
email: "admin@example.com",
username: "admin",
name: "Admin User",
teamId: team.id,
isAdmin: true,
service: 'slack',
serviceId: 'U2399UF1P',
service: "slack",
serviceId: "U2399UF1P",
slackData: {
id: 'U2399UF1P',
image_192: 'http://example.com/avatar.png',
id: "U2399UF1P",
image_192: "http://example.com/avatar.png",
},
createdAt: new Date('2018-01-01T00:00:00.000Z'),
createdAt: new Date("2018-01-01T00:00:00.000Z"),
});
const user = await User.create({
id: '46fde1d4-0050-428f-9f0b-0bf77f4bdf61',
email: 'user1@example.com',
username: 'user1',
name: 'User 1',
id: "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
email: "user1@example.com",
username: "user1",
name: "User 1",
teamId: team.id,
service: 'slack',
serviceId: 'U2399UF2P',
service: "slack",
serviceId: "U2399UF2P",
slackData: {
id: 'U2399UF2P',
image_192: 'http://example.com/avatar.png',
id: "U2399UF2P",
image_192: "http://example.com/avatar.png",
},
createdAt: new Date('2018-01-02T00:00:00.000Z'),
createdAt: new Date("2018-01-02T00:00:00.000Z"),
});
const collection = await Collection.create({
id: '26fde1d4-0050-428f-9f0b-0bf77f8bdf62',
name: 'Collection',
urlId: 'collection',
id: "26fde1d4-0050-428f-9f0b-0bf77f8bdf62",
name: "Collection",
urlId: "collection",
teamId: team.id,
creatorId: user.id,
type: 'atlas',
type: "atlas",
});
const document = await Document.create({
@ -70,8 +70,8 @@ const seed = async () => {
userId: collection.creatorId,
lastModifiedById: collection.creatorId,
createdById: collection.creatorId,
title: 'First ever document',
text: '# Much test support',
title: "First ever document",
text: "# Much test support",
});
await document.publish();
await collection.reload();