mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
refactor: move gateway package to app directory
This commit is contained in:
parent
67432d3fdf
commit
f250082fff
@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/ipfs/boxo/files"
|
||||
"github.com/onsonr/sonr/pkg/gateway/config/internal"
|
||||
"github.com/onsonr/sonr/app/gateway/config/internal"
|
||||
"github.com/onsonr/sonr/pkg/vault/types"
|
||||
)
|
||||
|
@ -2,9 +2,9 @@ package handlers
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/app/gateway/internal/pages/index"
|
||||
"github.com/onsonr/sonr/app/gateway/internal/session"
|
||||
"github.com/onsonr/sonr/pkg/common/response"
|
||||
"github.com/onsonr/sonr/pkg/gateway/internal/session"
|
||||
"github.com/onsonr/sonr/pkg/gateway/pages/index"
|
||||
)
|
||||
|
||||
func HandleIndex(c echo.Context) error {
|
@ -8,11 +8,11 @@ import (
|
||||
|
||||
"github.com/go-webauthn/webauthn/protocol"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/app/gateway/internal/database"
|
||||
"github.com/onsonr/sonr/app/gateway/internal/pages/register"
|
||||
"github.com/onsonr/sonr/crypto/mpc"
|
||||
"github.com/onsonr/sonr/pkg/common/response"
|
||||
"github.com/onsonr/sonr/pkg/common/styles/forms"
|
||||
"github.com/onsonr/sonr/pkg/gateway/internal/database"
|
||||
"github.com/onsonr/sonr/pkg/gateway/pages/register"
|
||||
)
|
||||
|
||||
func HandleRegisterView(c echo.Context) error {
|
@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/gateway/config"
|
||||
"github.com/onsonr/sonr/app/gateway/config"
|
||||
"gorm.io/driver/sqlite"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@ -32,12 +32,12 @@ func formatDBPath(path string) string {
|
||||
if home == "" {
|
||||
home = "."
|
||||
}
|
||||
|
||||
|
||||
configDir := filepath.Join(home, ".config", "hway")
|
||||
if err := os.MkdirAll(configDir, 0755); err != nil {
|
||||
if err := os.MkdirAll(configDir, 0o755); err != nil {
|
||||
// If we can't create the directory, fall back to current directory
|
||||
return path
|
||||
}
|
||||
|
||||
|
||||
return filepath.Join(configDir, path)
|
||||
}
|
@ -5,8 +5,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/app/gateway/internal/database"
|
||||
"github.com/onsonr/sonr/pkg/common"
|
||||
"github.com/onsonr/sonr/pkg/gateway/internal/database"
|
||||
"github.com/segmentio/ksuid"
|
||||
)
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/gateway/config"
|
||||
"github.com/onsonr/sonr/pkg/gateway/internal/database"
|
||||
"github.com/onsonr/sonr/app/gateway/config"
|
||||
"github.com/onsonr/sonr/app/gateway/internal/database"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ package session
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/gateway/internal/database"
|
||||
"github.com/onsonr/sonr/app/gateway/internal/database"
|
||||
)
|
||||
|
||||
// ╭───────────────────────────────────────────────────────╮
|
Loading…
x
Reference in New Issue
Block a user