The file database.cpp has a function "DeRestPluginPrivate::clearDb()", and the comment on this function states:
Clears all content of tables of db except auth table
However in the function code is the following:
// clear tables
const char *sql[] = {
"DELETE FROM auth",
Either the comment is wrong, or outdated.
Or the "auth" table is cleaned by mistake.
As per bug report template, you've removed allot of requested info.
Please add that info, so we can determine on which version/firmware this is.
I'm sorry, what exactly do you want me to add here?
While working on another issue and looking up the code, I stumbled over this discrepancy.
There is a function which code apparently doesn't match the comment above the function. Can't provide more information than that.
Here is the function: https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/database.cpp#L728
Someone else has to see if:
Please advise.
There's allot of this missing here..
None of that info is relevant for this issue.
@Mimiix Seriously, what has any of the excluded information to do with a discrepancy in the code?
Please review what this report is about. This is not about a specific device, or a supported platform. It's simply a problem in the source code.
Fair enough :)
It looks like the function isn't used at all and seems to be dead code. I think we can safely remove it.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bump
Thanks for the reminder, I created a PR to remove this function.
Most helpful comment
None of that info is relevant for this issue.