mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
refactor: use nebula/routes instead of nebula/global
This commit is contained in:
parent
32563a551d
commit
45c4e0c850
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/ipfs/boxo/files"
|
"github.com/ipfs/boxo/files"
|
||||||
dwngen "github.com/onsonr/sonr/pkg/dwn/gen"
|
dwngen "github.com/onsonr/sonr/pkg/dwn/gen"
|
||||||
"github.com/onsonr/sonr/pkg/nebula/global"
|
"github.com/onsonr/sonr/pkg/nebula/routes"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed app.wasm
|
//go:embed app.wasm
|
||||||
@ -30,7 +30,7 @@ func NewVaultDirectory(cnfg *dwngen.Config) (files.Node, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := bytes.NewBuffer(nil)
|
w := bytes.NewBuffer(nil)
|
||||||
err = global.IndexFile().Render(context.Background(), w)
|
err = routes.IndexFile().Render(context.Background(), w)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ func NewVaultDirectory(cnfg *dwngen.Config) (files.Node, error) {
|
|||||||
// Use IndexHTML template to generate the index file
|
// Use IndexHTML template to generate the index file
|
||||||
func IndexHTMLFile() (files.Node, error) {
|
func IndexHTMLFile() (files.Node, error) {
|
||||||
w := bytes.NewBuffer(nil)
|
w := bytes.NewBuffer(nil)
|
||||||
err := global.IndexFile().Render(context.Background(), w)
|
err := routes.IndexFile().Render(context.Background(), w)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user