Fix passing emitter to the authentication service

This commit is contained in:
ErickSkrauch 2020-04-07 00:13:04 +03:00
parent d526b74d07
commit f11dee57ff

View File

@ -98,11 +98,14 @@ var serveCmd = &cobra.Command{
address := fmt.Sprintf("%s:%d", viper.GetString("server.host"), viper.GetInt("server.port")) address := fmt.Sprintf("%s:%d", viper.GetString("server.host"), viper.GetInt("server.port"))
handler := (&http.Skinsystem{ handler := (&http.Skinsystem{
Emitter: dispatcher, Emitter: dispatcher,
SkinsRepo: skinsRepo, SkinsRepo: skinsRepo,
CapesRepo: capesRepo, CapesRepo: capesRepo,
MojangTexturesProvider: mojangTexturesProvider, MojangTexturesProvider: mojangTexturesProvider,
Authenticator: &http.JwtAuth{Key: []byte(viper.GetString("chrly.secret"))}, Authenticator: &http.JwtAuth{
Key: []byte(viper.GetString("chrly.secret")),
Emitter: dispatcher,
},
TexturesExtraParamName: viper.GetString("textures.extra_param_name"), TexturesExtraParamName: viper.GetString("textures.extra_param_name"),
TexturesExtraParamValue: viper.GetString("textures.extra_param_value"), TexturesExtraParamValue: viper.GetString("textures.extra_param_value"),
}).CreateHandler() }).CreateHandler()