connect fn update
This commit is contained in:
1 parent
43af2996bf
commit
0713bad871
14 files changed
+16
-26
No files matched your search
+1
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user