MobX based editing

This commit is contained in:
Jori Lallo
2016-06-02 22:04:33 -07:00
parent aac20341f7
commit e6c7e95115
26 changed files with 436 additions and 185 deletions

View File

@@ -21,12 +21,12 @@ router.post('documents.info', auth({ require: false }), async (ctx) => {
// Don't expose private documents outside the team
if (document.private) {
if (!ctx.state.user) throw httpErrors.NotFound();
// if (!ctx.state.user) throw httpErrors.NotFound();
const team = await ctx.state.user.getTeam();
if (document.teamId !== team.id) {
if (!document) throw httpErrors.NotFound();
}
// const team = await ctx.state.user.getTeam();
// if (document.teamId !== team.id) {
// if (!document) throw httpErrors.NotFound();
// }
ctx.body = {
data: await presentDocument(document, true),