Skip to content
Snippets Groups Projects
Unverified Commit 15fc5b80 authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: /user route

parent c4083a69
No related branches found
No related tags found
No related merge requests found
...@@ -94,10 +94,8 @@ const _ = (async () => { ...@@ -94,10 +94,8 @@ const _ = (async () => {
})) }))
await configureAuth(app) await configureAuth(app)
/**
* TODO fix user import app.use('/user', require('./user'))
*/
// app.use('/user', require('./user'))
/** /**
* saneUrl end points * saneUrl end points
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"express-rate-limit": "^5.5.1", "express-rate-limit": "^5.5.1",
"express-session": "^1.15.6", "express-session": "^1.15.6",
"got": "^11.8.5", "got": "^11.8.5",
"hbp-seafile": "^0.2.3", "hbp-seafile": "^0.3.0",
"helmet-csp": "^3.4.0", "helmet-csp": "^3.4.0",
"lru-cache": "^5.1.1", "lru-cache": "^5.1.1",
"memorystore": "^1.6.1", "memorystore": "^1.6.1",
...@@ -1298,9 +1298,9 @@ ...@@ -1298,9 +1298,9 @@
} }
}, },
"node_modules/hbp-seafile": { "node_modules/hbp-seafile": {
"version": "0.2.3", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/hbp-seafile/-/hbp-seafile-0.2.3.tgz", "resolved": "https://registry.npmjs.org/hbp-seafile/-/hbp-seafile-0.3.0.tgz",
"integrity": "sha512-XAozXhjjv7dLHvjH/mcotAce1ZfvFTq6BqRSONhVkVEUOeQi/rQQokJTre3oNM/sponeMpPg8gyzZMFicI4tWw==", "integrity": "sha512-IEuQInjQbq0xUdULHsySTtfrbcIcZjCsPbw3SZMAE8gDqZwYvKevZQmvUT4KvbtC4inoA/aLASVXw4b1wZXQmQ==",
"dependencies": { "dependencies": {
"@types/got": "^9.6.12", "@types/got": "^9.6.12",
"got": "^12.6.0" "got": "^12.6.0"
...@@ -3881,9 +3881,9 @@ ...@@ -3881,9 +3881,9 @@
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
}, },
"hbp-seafile": { "hbp-seafile": {
"version": "0.2.3", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/hbp-seafile/-/hbp-seafile-0.2.3.tgz", "resolved": "https://registry.npmjs.org/hbp-seafile/-/hbp-seafile-0.3.0.tgz",
"integrity": "sha512-XAozXhjjv7dLHvjH/mcotAce1ZfvFTq6BqRSONhVkVEUOeQi/rQQokJTre3oNM/sponeMpPg8gyzZMFicI4tWw==", "integrity": "sha512-IEuQInjQbq0xUdULHsySTtfrbcIcZjCsPbw3SZMAE8gDqZwYvKevZQmvUT4KvbtC4inoA/aLASVXw4b1wZXQmQ==",
"requires": { "requires": {
"@types/got": "^9.6.12", "@types/got": "^9.6.12",
"got": "^12.6.0" "got": "^12.6.0"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"express-rate-limit": "^5.5.1", "express-rate-limit": "^5.5.1",
"express-session": "^1.15.6", "express-session": "^1.15.6",
"got": "^11.8.5", "got": "^11.8.5",
"hbp-seafile": "^0.2.3", "hbp-seafile": "^0.3.0",
"helmet-csp": "^3.4.0", "helmet-csp": "^3.4.0",
"lru-cache": "^5.1.1", "lru-cache": "^5.1.1",
"memorystore": "^1.6.1", "memorystore": "^1.6.1",
......
const { Seafile } = require('hbp-seafile')
const { Readable } = require('stream') const { Readable } = require('stream')
const IAV_DIR_NAME = `interactive-atlas-viewer` const IAV_DIR_NAME = `interactive-atlas-viewer`
...@@ -6,6 +5,7 @@ const IAV_DIRECTORY = `/${IAV_DIR_NAME}/` ...@@ -6,6 +5,7 @@ const IAV_DIRECTORY = `/${IAV_DIR_NAME}/`
const IAV_FILENAME = 'data.json' const IAV_FILENAME = 'data.json'
const getNewSeafilehandle = async ({ accessToken }) => { const getNewSeafilehandle = async ({ accessToken }) => {
const { Seafile } = await import("hbp-seafile")
const seafileHandle = new Seafile({ accessToken }) const seafileHandle = new Seafile({ accessToken })
await seafileHandle.init() await seafileHandle.init()
return seafileHandle return seafileHandle
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment