Working API for subscribing and unsubscribing
This commit is contained in:
parent
d5222f7b4d
commit
11f412ded1
15 changed files with 439 additions and 24 deletions
|
@ -69,6 +69,10 @@ router.post('/update', passport.parseForm, passport.csrfProtection, (req, res) =
|
|||
Object.keys(data).forEach(key => {
|
||||
let value = data[key].trim();
|
||||
key = tools.toDbKey(key);
|
||||
// ensure trailing slash for service home page
|
||||
if (key === 'service_url' && value && !/\/$/.test(value)) {
|
||||
value = value + '/';
|
||||
}
|
||||
if (allowedKeys.indexOf(key) >= 0) {
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue