mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 15:22:47 +01:00
26 lines
444 B
Go
26 lines
444 B
Go
package app
|
|
|
|
import (
|
|
"github.com/pocketbase/pocketbase/core"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func Bootstrap(app core.App) error {
|
|
if err := app.Bootstrap(); err != nil {
|
|
return err
|
|
}
|
|
|
|
return MigrateDBs(app)
|
|
}
|
|
|
|
func bootstrapCmd(app core.App) *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "bootstrap",
|
|
Run: func(_ *cobra.Command, _ []string) {
|
|
if err := Bootstrap(app); err != nil {
|
|
app.Logger().Error(err.Error())
|
|
}
|
|
},
|
|
}
|
|
}
|