chore: remove unused flags

This commit is contained in:
Steven
2024-05-03 07:16:07 +08:00
parent 5742f9ca13
commit 10c57167cc
6 changed files with 5 additions and 28 deletions

View File

@@ -30,10 +30,6 @@ type Profile struct {
Driver string `json:"-"`
// Version is the current version of server
Version string `json:"version"`
// Frontend indicate the frontend is enabled or not
Frontend bool `json:"-"`
// Origins is the list of allowed origins
Origins []string `json:"-"`
}
func (p *Profile) IsDev() bool {

View File

@@ -61,11 +61,8 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
return c.String(http.StatusOK, "Service ready.")
})
// Only serve frontend when it's enabled.
if profile.Frontend {
frontendService := frontend.NewFrontendService(profile, store)
frontendService.Serve(ctx, echoServer)
}
// Serve frontend resources.
frontend.NewFrontendService(profile, store).Serve(ctx, echoServer)
rootGroup := echoServer.Group("")