Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
2.67k stars 109 forks source link

Fix admin user api endpoint #328

Closed a-mnich closed 6 months ago

a-mnich commented 6 months ago

Initially there is always only one Admin user after setting the application up. As consequence users.length <=1will always be true and the API endpoints responds with the error code 400 upon trying to add an additional admin user. This fix adds a validation which checks if an admin user is removed or added.
The error response will only be sent upon removal.

Yooooomi commented 6 months ago

Hello! Thanks a lot for this fix, merging