Skip to content

Commit

Permalink
release: v0.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Oct 23, 2021
1 parent 58e482d commit e1a2a94
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/sharelist/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.3.9](https://github.com/reruin/sharelist/compare/v0.3.8...v0.3.9) (2021-10-23)



## [0.3.8](https://github.com/reruin/sharelist/compare/v0.3.7...v0.3.8) (2021-10-19)


Expand Down
2 changes: 1 addition & 1 deletion packages/sharelist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (!fs.existsSync('./cache')) {
fs.mkdirSync('./cache')
}

const port = app?.sharelist?.config?.port || 33001
const port = process.env.PORT || 33001

const server = http.createServer(app.callback())
server.on('error', onError).on('listening', onListening)
Expand Down
5 changes: 2 additions & 3 deletions packages/sharelist/app/controller/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ module.exports = {
let sharelist = this.app.sharelist
let runtime = await createRuntime(ctx)
let { data, error } = await sharelist.getFiles(runtime)

if (error) {
ctx.body = { error }
} else {
Expand All @@ -130,9 +129,9 @@ module.exports = {
.sort((a, b) => (a.type == 'folder' ? -1 : 1))
.forEach((i) => {
if (i.type == 'file') {
i.download_url = ctx.origin + '/api/drive/get?download=true&id=' + encodeURIComponent(i.id)
i.download_url = '/api/drive/get?download=true&id=' + encodeURIComponent(i.id)
if (i.extra?.preview_url) {
i.preview_url = ctx.origin + '/api/drive/get?download=true&preview=true&id=' + encodeURIComponent(i.id)
i.preview_url = '/api/drive/get?download=true&preview=true&id=' + encodeURIComponent(i.id)
}
}
})
Expand Down
4 changes: 1 addition & 3 deletions packages/sharelist/app/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { App } = require('./core/app')

module.exports = new App()

console.log(Buffer.from('rQWtTu7NDn+6sifyQLEfYw==', 'base64').toString('hex'))
module.exports = new App()
2 changes: 1 addition & 1 deletion packages/sharelist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sharelist",
"version": "0.3.8",
"version": "0.3.9",
"bin": "app.js",
"repository": "https://github.com/reruin/sharelist",
"license": "MIT",
Expand Down

0 comments on commit e1a2a94

Please sign in to comment.