Verified Commit fac2f7af authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix ldap weight setting

parent 9b66758c
......@@ -84,10 +84,10 @@ async function register ({
login: options => login(peertubeHelpers, settingsManager, options)
})
store.weight = await settingsManager.getSetting('weight')
setWeight(await settingsManager.getSetting('weight'))
settingsManager.onSettingsChange(settings => {
if (settigns && typeof settings.weight === 'number') store.weight = weight
if (settings && settings.weight) setWeight(settings.weight)
})
}
......@@ -102,6 +102,10 @@ module.exports = {
// ############################################################################
function setWeight (weight) {
store.weight = parseInt(weight + '', 10)
}
async function login (peertubeHelpers, settingsManager, options) {
const logger = peertubeHelpers.logger
......
{
"name": "peertube-plugin-auth-ldap",
"version": "0.0.1",
"version": "0.0.3",
"description": "Add LDAP support to login form in PeerTube.",
"engine": {
"peertube": ">=2.2.0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment