mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-12-22 13:07:00 +00:00
Strip trailing slash from instance
This commit is contained in:
parent
ebdc88fe4c
commit
c6363424cb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user