mirror of
https://github.com/unmojang/drasl.git
synced 2025-09-09 15:18:55 -04:00
fixes requested in review
This commit is contained in:
parent
1dbf4f1371
commit
d856a85aac
@ -75,7 +75,7 @@ type Config struct {
|
|||||||
Domain string
|
Domain string
|
||||||
EnableBackgroundEffect bool
|
EnableBackgroundEffect bool
|
||||||
EnableFooter bool
|
EnableFooter bool
|
||||||
EnableFrontend bool
|
EnableWebFrontEnd bool
|
||||||
FallbackAPIServers []FallbackAPIServer
|
FallbackAPIServers []FallbackAPIServer
|
||||||
ForwardSkins bool
|
ForwardSkins bool
|
||||||
InstanceName string
|
InstanceName string
|
||||||
@ -124,7 +124,7 @@ func DefaultConfig() Config {
|
|||||||
Domain: "",
|
Domain: "",
|
||||||
EnableBackgroundEffect: true,
|
EnableBackgroundEffect: true,
|
||||||
EnableFooter: true,
|
EnableFooter: true,
|
||||||
EnableFrontend: true,
|
EnableWebFrontEnd: true,
|
||||||
ForwardSkins: true,
|
ForwardSkins: true,
|
||||||
InstanceName: "Drasl",
|
InstanceName: "Drasl",
|
||||||
ListenAddress: "0.0.0.0:25585",
|
ListenAddress: "0.0.0.0:25585",
|
||||||
|
12
main.go
12
main.go
@ -144,7 +144,7 @@ func (app *App) MakeServer() *echo.Echo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Front
|
// Front
|
||||||
if app.Config.EnableFrontend {
|
if app.Config.EnableWebFrontEnd {
|
||||||
t := NewTemplate(app)
|
t := NewTemplate(app)
|
||||||
e.Renderer = t
|
e.Renderer = t
|
||||||
e.GET("/", FrontRoot(app))
|
e.GET("/", FrontRoot(app))
|
||||||
@ -169,11 +169,11 @@ func (app *App) MakeServer() *echo.Echo {
|
|||||||
e.POST("/web/update-player", FrontUpdatePlayer(app))
|
e.POST("/web/update-player", FrontUpdatePlayer(app))
|
||||||
e.POST("/web/update-user", FrontUpdateUser(app))
|
e.POST("/web/update-user", FrontUpdateUser(app))
|
||||||
e.Static("/web/public", path.Join(app.Config.DataDirectory, "public"))
|
e.Static("/web/public", path.Join(app.Config.DataDirectory, "public"))
|
||||||
e.Static("/web/texture/cape", path.Join(app.Config.StateDirectory, "cape"))
|
|
||||||
e.Static("/web/texture/default-cape", path.Join(app.Config.StateDirectory, "default-cape"))
|
|
||||||
e.Static("/web/texture/default-skin", path.Join(app.Config.StateDirectory, "default-skin"))
|
|
||||||
e.Static("/web/texture/skin", path.Join(app.Config.StateDirectory, "skin"))
|
|
||||||
}
|
}
|
||||||
|
e.Static("/web/texture/cape", path.Join(app.Config.StateDirectory, "cape"))
|
||||||
|
e.Static("/web/texture/default-cape", path.Join(app.Config.StateDirectory, "default-cape"))
|
||||||
|
e.Static("/web/texture/default-skin", path.Join(app.Config.StateDirectory, "default-skin"))
|
||||||
|
e.Static("/web/texture/skin", path.Join(app.Config.StateDirectory, "skin"))
|
||||||
|
|
||||||
// Drasl API
|
// Drasl API
|
||||||
e.DELETE(DRASL_API_PREFIX+"/invites/:code", app.APIDeleteInvite())
|
e.DELETE(DRASL_API_PREFIX+"/invites/:code", app.APIDeleteInvite())
|
||||||
@ -437,7 +437,7 @@ func setup(config *Config) *App {
|
|||||||
log.Fatal(result.Error)
|
log.Fatal(result.Error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if app.Config.EnableFrontend {
|
if app.Config.EnableWebFrontEnd {
|
||||||
log.Println("No users found! Here's an invite URL:", Unwrap(app.InviteURL(&invite)))
|
log.Println("No users found! Here's an invite URL:", Unwrap(app.InviteURL(&invite)))
|
||||||
} else {
|
} else {
|
||||||
log.Println("No users found! Here's an invite code:", invite.Code)
|
log.Println("No users found! Here's an invite code:", invite.Code)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user