Skip to content

Commit

Permalink
release 3.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehs committed Nov 4, 2021
1 parent 4c53626 commit 00ed43c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 33 deletions.
9 changes: 0 additions & 9 deletions db/session.js

This file was deleted.

22 changes: 0 additions & 22 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,6 @@ app
}
res.json(u)
})
.post("/clear-session/", async (req, res) => {
let { username, password } = req.body
let u = await User.login({ username, password })
if (u.success && await User.isUserAdmin(u.user)) {
try {
await require('./db/session').clearAll()
} catch (e) {
return res.json({ success: false, e })
}
res.json({ success: true })

addLog({
level: "warn",
type: "system",
event: "Session cleared.",
user: req.session.user,
description: `User {${req.session.user}} clearned session`
})
} else {
res.json({ success: false, e: 'Permission Denied Desu' })
}
})
.get("/logout/", (req, res) => {
// 登出
if (req.session.user) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pokaplayer",
"version": "3.4.12",
"version": "3.4.13",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 00ed43c

Please sign in to comment.