mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 09:51:39 +00:00
- **feat: provide access to block time** - **refactor: move block expiry calculation to helper function** - **feat: register decentralized web node HTMX views** - **feat: Reorganize methods in layout.templ file alphabetically** - **feat: add support for layout variants** - **feat: update Allocate RPC to use GET request with path parameters** - **feat: add gRPC Gateway endpoint for Allocate** - **refactor: rename SyncCurrent to Sync** - **feat: improve code organization by making vault assembly private** - **feat: add a new method for syncing DID documents**
21 lines
421 B
Go
21 lines
421 B
Go
package vaultindex
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
|
|
"github.com/ipfs/boxo/files"
|
|
"github.com/onsonr/sonr/internal/dwn/gen"
|
|
)
|
|
|
|
// BuildFile builds the index.html file for the vault
|
|
func BuildFile(cnfg *gen.Config) (files.Node, error) {
|
|
w := bytes.NewBuffer(nil)
|
|
err := IndexFile().Render(context.Background(), w)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
indexData := w.Bytes()
|
|
return files.NewBytesFile(indexData), nil
|
|
}
|