mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-06 03:31:02 -06:00
[server] Remove core1 and core2 imports
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/shroff/phylum/server/internal/core"
|
||||
core1 "github.com/shroff/phylum/server/internal/core"
|
||||
"github.com/shroff/phylum/server/internal/db"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -19,7 +18,7 @@ func setupModCommand() *cobra.Command {
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
email := args[0]
|
||||
u, err := core1.UserManagerFromContext(context.Background()).UserByEmail(email)
|
||||
u, err := core.UserManagerFromContext(context.Background()).UserByEmail(email)
|
||||
if err != nil {
|
||||
fmt.Println("could not update user '" + email + "': " + err.Error())
|
||||
os.Exit(1)
|
||||
@@ -43,7 +42,7 @@ func setupModCommand() *cobra.Command {
|
||||
}
|
||||
|
||||
err = db.Get(context.Background()).RunInTx(func(db db.Handler) error {
|
||||
m := core1.UserManagerFromDB(db)
|
||||
m := core.UserManagerFromDB(db)
|
||||
if name != "" {
|
||||
if err := m.UpdateUserName(u, name); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user