mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:17:08 +00:00
Don't require authentication for the /version endpoint.
It will still hide the `db` and `os` values from non-admins though.
This commit is contained in:
@@ -5,7 +5,7 @@ module.exports = async function (req, res, next) {
|
||||
|
||||
try {
|
||||
const v = await version();
|
||||
if (req.user.role != "admin" && req.user.role != "user") {
|
||||
if (req.user?.role != "admin" && req.user?.role != "user") {
|
||||
delete v.os;
|
||||
delete v.db;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user