Fixed the proxy causing an error due to a wrong usage of the updateAttribute method (we don't need to specify the old values). Because of that, cozydb couldn't find the callback and prompted an error without any response being sent to the client.
While I was working on this fix, I also noticed a wrong usage of Array's splice method: as described here the return value is an array containing the removed elements, while the original gets this/these element(s) removed. So we were updating the user's recovery codes with an array containing exclusively the code we wanted to remove, instead of an array containing all the recovery codes except this one. Fixed it too.
Fixed the proxy causing an error due to a wrong usage of the
updateAttribute
method (we don't need to specify the old values). Because of that,cozydb
couldn't find the callback and prompted an error without any response being sent to the client.While I was working on this fix, I also noticed a wrong usage of
Array
'ssplice
method: as described here the return value is an array containing the removed elements, while the original gets this/these element(s) removed. So we were updating the user's recovery codes with an array containing exclusively the code we wanted to remove, instead of an array containing all the recovery codes except this one. Fixed it too.