Added private field to documents

This commit is contained in:
Jori Lallo
2016-05-25 22:47:31 -07:00
parent a86a7b2c76
commit 717c55e173
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ const generateSlug = (title, urlId) => {
const Document = sequelize.define('document', { const Document = sequelize.define('document', {
id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true }, id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true },
urlId: { type: DataTypes.STRING, primaryKey: true }, urlId: { type: DataTypes.STRING, primaryKey: true },
private: { type: DataTypes.BOOLEAN, defaultValue: true },
title: DataTypes.STRING, title: DataTypes.STRING,
text: DataTypes.TEXT, text: DataTypes.TEXT,
html: DataTypes.TEXT, html: DataTypes.TEXT,

View File

@ -57,6 +57,7 @@ export async function presentDocument(document, includeAtlas=false) {
const data = { const data = {
id: document.id, id: document.id,
url: document.buildUrl(), url: document.buildUrl(),
private: document.private,
title: document.title, title: document.title,
text: document.text, text: document.text,
html: document.html, html: document.html,