omg.lol
omg.lol copied to clipboard
[Bug] Account settings API should have default values for web editor and date format when not configured explicitly
Bug Description
For a new account that has no explicit configuration, the account settings API returns null for web_editor
and date_format
:
// https://api.omg.lol/account/[email protected]/settings
{
"request": {
"status_code": 200,
"success": true
},
"response": {
"message": "Here are the settings for this account.",
"settings": {
"owner": "[email protected]",
"communication": "email_not_ok",
"date_format": "iso_8601", // this was null originally until I clicked save on the web UI
"web_editor": null
}
}
}
But they should have default values just like the "communication" field, since from UI perspective, the date_format has a default tick of the ISO_8601.
Steps to Reproduce
Create a new account, request to the API.
I had a similar issue, but for me the whole settings block was returned as false initially, see https://github.com/neatnik/omg.lol/issues/583. I think @newbold is actively working on it.
I had a similar issue, but for me the whole settings block was returned as false initially, see #583. I think @newbold is actively working on it.
Oh interesting. Thanks for letting me know. They're similar but still not the same (one being the section initialization problem, the other being populating default values). But it's fine if we want to track it together.
Possible dup of #583