New onboarding document
This commit is contained in:
@@ -7,6 +7,7 @@ import { asyncLock } from '../redis';
|
||||
import events from '../events';
|
||||
import Document from './Document';
|
||||
import Event from './Event';
|
||||
import { welcomeMessage } from '../utils/onboarding';
|
||||
|
||||
// $FlowIssue invalid flow-typed
|
||||
slug.defaults.mode = 'rfc3986';
|
||||
@@ -57,8 +58,8 @@ const Collection = sequelize.define(
|
||||
userId: collection.creatorId,
|
||||
lastModifiedById: collection.creatorId,
|
||||
createdById: collection.creatorId,
|
||||
title: 'Introduction',
|
||||
text: '# Introduction\n\nLets get started...',
|
||||
title: 'Welcome to Outline',
|
||||
text: welcomeMessage(collection.id),
|
||||
});
|
||||
collection.documentStructure = [document.toJSON()];
|
||||
} else {
|
||||
|
||||
@@ -32,14 +32,13 @@ Team.associate = models => {
|
||||
};
|
||||
|
||||
Team.prototype.createFirstCollection = async function(userId) {
|
||||
const atlas = await Collection.create({
|
||||
name: this.name,
|
||||
return await Collection.create({
|
||||
name: 'General',
|
||||
description: 'Your first Collection',
|
||||
type: 'atlas',
|
||||
teamId: this.id,
|
||||
creatorId: userId,
|
||||
});
|
||||
return atlas;
|
||||
};
|
||||
|
||||
Team.prototype.addAdmin = async function(user: User) {
|
||||
|
||||
Reference in New Issue
Block a user