Legwork for initial documents for atlases

This commit is contained in:
Jori Lallo
2016-07-26 00:05:10 -07:00
parent c88cc1f83b
commit e706e1c77c
6 changed files with 64 additions and 38 deletions

View File

@@ -13,12 +13,13 @@ const Team = sequelize.define('team', {
slackData: DataTypes.JSONB,
}, {
instanceMethods: {
async createFirstAtlas() {
async createFirstAtlas(userId) {
const atlas = await Atlas.create({
name: this.name,
description: 'Your first Atlas',
type: 'journal',
teamId: this.id,
creatorId: userId,
});
return atlas;
}