Browse Source

Merge pull request #8 from superseriousbusiness/fix_email_field

[bugfix] Fix email field not working properly
main
f0x52 4 years ago committed by GitHub
parent
commit
1c11d8943e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/settings.js

5
src/settings.js

@ -29,6 +29,9 @@ module.exports = function Settings({oauth}) {
key = "contact_username"; key = "contact_username";
val = val.username; val = val.username;
} }
if (key == "email") {
key = "contact_email";
}
if (typeof val != "object") { if (typeof val != "object") {
formDataInfo.append(key, val); formDataInfo.append(key, val);
} }
@ -63,7 +66,7 @@ function editableObject(obj, path=[]) {
const readOnlyKeys = ["uri", "version", "urls_streaming_api", "stats"]; const readOnlyKeys = ["uri", "version", "urls_streaming_api", "stats"];
const hiddenKeys = ["contact_account_", "urls"]; const hiddenKeys = ["contact_account_", "urls"];
const explicitShownKeys = ["contact_account_username"]; const explicitShownKeys = ["contact_account_username"];
const implementedKeys = "title, contact_account_username, contact_email, short_description, description, terms, avatar, header".split(", "); const implementedKeys = "title, contact_account_username, email, short_description, description, terms, avatar, header".split(", ");
let listing = Object.entries(obj).map(([key, val]) => { let listing = Object.entries(obj).map(([key, val]) => {
let fullkey = [...path, key].join("_"); let fullkey = [...path, key].join("_");

Loading…
Cancel
Save