Slightly annoying, confusing and sending unnecessary bytes, so I've fixed the User.getPublicUser() method to only return the properties that are actually needed for, well, public users.
Currently, properties like desktop and webauthn_enabled are returned with their default values, which, while not exposing anything, are not matching the schemas.
This PR adjusts the method to call <User>.toPublicUser() and removes arguments which were rarely used and can be replaced with e.g. User.findOneOrFail().
Slightly annoying, confusing and sending unnecessary bytes, so I've fixed the
User.getPublicUser()
method to only return the properties that are actually needed for, well, public users.Currently, properties like
desktop
andwebauthn_enabled
are returned with their default values, which, while not exposing anything, are not matching the schemas.This PR adjusts the method to call
<User>.toPublicUser()
and removes arguments which were rarely used and can be replaced with e.g.User.findOneOrFail()
.