mvdan / bitw

Minimalist BitWarden client
BSD 3-Clause "New" or "Revised" License
169 stars 15 forks source link

Remove Organizations from profile json #14

Closed clinta closed 4 years ago

clinta commented 4 years ago

This PR removes organizations from the profile json. Organizations are not []string, they are an array of another struct. But since organizations are not used by bitw anyway, it seems pointless to model that struct.

Without this PR, a bitw sync for a user in an organization results in error: could not sync: json: cannot unmarshal object into Go struct field Profile.Profile.Organizations of type string

mvdan commented 4 years ago

You're right, I was being lazy there. Perhaps a coincidence, but someone sent an extremely similar PR earlier today :) I've merged that, so the issue should be fixed. Please feel free to send another patch if that doesn't work for you, or re-send this one.

clinta commented 4 years ago

Good call, that PR is better. Less lazy, and leaves open the ability to start doing stuff with organizations in the future.