mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
bearer-auth: customcss cleanup
This commit is contained in:
parent
c8e486630e
commit
76119811ff
|
@ -454,19 +454,7 @@ authRoutes.get("/me", requiresAccount, (req,res) => {
|
|||
})
|
||||
|
||||
authRoutes.get("/customCSS", (req,res) => {
|
||||
if (!auth.validate(req.cookies.auth)) {
|
||||
ServeError(res, 401, "not logged in")
|
||||
return
|
||||
}
|
||||
|
||||
// lazy rn so
|
||||
|
||||
let acc = Accounts.getFromToken(req.cookies.auth)
|
||||
if (acc) {
|
||||
if (acc.customCSS) {
|
||||
res.redirect(`/file/${acc.customCSS}`)
|
||||
} else {
|
||||
res.send("")
|
||||
}
|
||||
} else res.send("")
|
||||
let acc = res.locals.acc
|
||||
if (acc?.customCSS) res.redirect(`/file/${acc.customCSS}`)
|
||||
else res.send("")
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue