omg.lol icon indicating copy to clipboard operation
omg.lol copied to clipboard

[Bug] Account settings API should have default values for web editor and date format when not configured explicitly

Open wayneyaoo opened this issue 2 years ago • 3 comments

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.

wayneyaoo avatar Feb 07 '23 13:02 wayneyaoo

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.

ejstreet avatar Feb 08 '23 00:02 ejstreet

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.

wayneyaoo avatar Feb 08 '23 00:02 wayneyaoo

Possible dup of #583

wayneyaoo avatar Feb 08 '23 00:02 wayneyaoo