Stopped root page from exporting as html and fix URL for icon

This commit is contained in:
QiTao 2020-02-09 05:55:07 -06:00
parent 3f9730955a
commit c780aa5fba
2 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@
<div class="row">
<div class="col-sm-3 navsec">
<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">
%%SIDEBAR%%
</div>

View File

@ -23,7 +23,7 @@ class Export extends Controller {
const pages = await Page.find({ OrgUserId: user._id })
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 PageData = { ...page }
@ -84,7 +84,7 @@ class Export extends Controller {
const Page = this.models.get('api:Page')
const Node = this.models.get('api:Node')
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 page0 = await user.get_root_page() //topmost page