zorchenhimer / MoviePolls

Voting to decide on a movie to watch with MovieNight
https://discord.gg/F2VSgjJ
16 stars 6 forks source link

OAuth Error gives user feedback #124

Closed CptPie closed 2 years ago

CptPie commented 2 years ago

This fixes #118.

I created a new struct

type callbackError struct {
    user         int
    message string
}

in the web package and added it to the webServer struct.

This new struct is used to "transmit" errors from the oauth callbacks to the frontend (a simple return would not work since the callback is executed by the routing and has no place to return the error to).

For further implementation details see the commit messages.