1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-09-19 18:57:30 +00:00

Strip trailing slash from instance

This commit is contained in:
Cadence Ember 2021-02-06 19:56:50 +13:00
parent ebdc88fe4c
commit c6363424cb
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17

View File

@ -31,7 +31,12 @@ module.exports = [
for (const key of Object.keys(constants.user_settings)) {
const setting = constants.user_settings[key]
if (params.has(key)) {
const provided = params.get(key)
let provided = params.get(key)
if (key === "instance") {
provided = provided.replace(/\/+$/, "")
}
if (setting.type === "string") {
if (provided) data[key] = provided
else data[key] = null