connect fn update

This commit is contained in:
tmshv committed 2019-08-01 17:10:50 +03:00
1 parent 43af2996bf
commit 0713bad871
14 files changed
+16 -26

No files matched your search

+1 -2
View File
@@ -1,10 +1,9 @@
import { dbUri } from '../../src/config'
import { connect } from '../../src/core/db'
import Page from '../../src/core/Page'
import { getPathWithNoTrailingSlash } from '../../src/lib/url'
export default async (req, res) => {
await connect(dbUri)
await connect()
const page = getPathWithNoTrailingSlash(req.query.page)
const resource = await Page.findByUrl(page)