Merge branch 'master' of ssh.dev.azure.com:v3/HackKu/HackKu%202020/backend

This commit is contained in:
garrettmills 2020-02-09 17:09:19 -06:00
commit c105c78f9b
2 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@
<div class="row"> <div class="row">
<div class="col-sm-3 navsec"> <div class="col-sm-3 navsec">
<nav class="navbar navbar-dark bg-dark flex-column"> <nav class="navbar navbar-dark bg-dark flex-column">
<a class="navbar-brand" href="#"><img src="/logo/Asset+1.svg" width="30" height="30" class="d-inline-block align-top" alt="">Noded</a> <a class="navbar-brand" href="#"><img src="https://hack20.glmdev.tech/assets/logo/3x/logo3x.png" width="30" height="30" class="d-inline-block align-top" alt="">Noded</a>
<div class="nav nav-pills flex-column"> <div class="nav nav-pills flex-column">
%%SIDEBAR%% %%SIDEBAR%%
</div> </div>

View File

@ -23,7 +23,7 @@ class Export extends Controller {
const pages = await Page.find({ OrgUserId: user._id }) const pages = await Page.find({ OrgUserId: user._id })
const ExportData = {} const ExportData = {}
for (const page of pages) { for (const page of pages) { //for all pages of the user, generate a copy of the data
const nodes = await Node.find({ PageId: page.UUID }) const nodes = await Node.find({ PageId: page.UUID })
const PageData = { ...page } const PageData = { ...page }
@ -84,7 +84,7 @@ class Export extends Controller {
const Page = this.models.get('api:Page') const Page = this.models.get('api:Page')
const Node = this.models.get('api:Node') const Node = this.models.get('api:Node')
const user = req.user const user = req.user
const pages = await Page.find({ OrgUserId: user._id }) const pages = await Page.find({ OrgUserId: user._id, ParentId: { $ne: '0' } })
const mapping = {} //keeps track of html file UUID and file name const mapping = {} //keeps track of html file UUID and file name
const page0 = await user.get_root_page() //topmost page const page0 = await user.get_root_page() //topmost page
@ -126,7 +126,7 @@ class Export extends Controller {
async _sidebar_recurse(mapping, parent) { async _sidebar_recurse(mapping, parent) {
const Page = this.models.get('api:Page') const Page = this.models.get('api:Page')
const Node = this.models.get('api:Node') const Node = this.models.get('api:Node')
const children = await Page.find({ ParentId : parent.UUID}) const children = await Page.find({ ParentId: parent.UUID })
let base = '' let base = ''
for (const child of children) { for (const child of children) {
if (child.ChildPageIds.length === 0) { if (child.ChildPageIds.length === 0) {