mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 13:37:01 +03:00
Fix adding VIPs
This commit is contained in:
@@ -4,7 +4,6 @@ var config = require('../config.js');
|
|||||||
var db = require('../databases/databases.js').db;
|
var db = require('../databases/databases.js').db;
|
||||||
var getHash = require('../utils/getHash.js');
|
var getHash = require('../utils/getHash.js');
|
||||||
|
|
||||||
|
|
||||||
module.exports = async function addUserAsVIP (req, res) {
|
module.exports = async function addUserAsVIP (req, res) {
|
||||||
let userID = req.query.userID;
|
let userID = req.query.userID;
|
||||||
let adminUserIDInput = req.query.adminUserID;
|
let adminUserIDInput = req.query.adminUserID;
|
||||||
@@ -25,7 +24,7 @@ module.exports = async function addUserAsVIP (req, res) {
|
|||||||
//hash the userID
|
//hash the userID
|
||||||
adminUserIDInput = getHash(adminUserIDInput);
|
adminUserIDInput = getHash(adminUserIDInput);
|
||||||
|
|
||||||
if (adminUserIDInput !== adminUserID) {
|
if (adminUserIDInput !== config.adminUserID) {
|
||||||
//not authorized
|
//not authorized
|
||||||
res.sendStatus(403);
|
res.sendStatus(403);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user