mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-14 20:07:50 +00:00
chore: rename to slash
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
"github.com/boojack/shortify/internal/util"
|
||||
"github.com/boojack/slash/internal/util"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/boojack/shortify/server/version"
|
||||
"github.com/boojack/slash/server/version"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
type Profile struct {
|
||||
// Data is the data directory
|
||||
Data string `json:"-"`
|
||||
// DSN points to where Shortify stores its own data
|
||||
// DSN points to store data
|
||||
DSN string `json:"-"`
|
||||
// Mode can be "prod" or "dev"
|
||||
Mode string `json:"mode"`
|
||||
@ -57,7 +57,7 @@ func GetProfile() (*Profile, error) {
|
||||
}
|
||||
|
||||
if profile.Mode == "prod" && profile.Data == "" {
|
||||
profile.Data = "/var/opt/shortify"
|
||||
profile.Data = "/var/opt/slash"
|
||||
}
|
||||
|
||||
dataDir, err := checkDSN(profile.Data)
|
||||
@ -67,7 +67,7 @@ func GetProfile() (*Profile, error) {
|
||||
}
|
||||
|
||||
profile.Data = dataDir
|
||||
profile.DSN = fmt.Sprintf("%s/shortify_%s.db", dataDir, profile.Mode)
|
||||
profile.DSN = fmt.Sprintf("%s/slash_%s.db", dataDir, profile.Mode)
|
||||
profile.Version = version.GetCurrentVersion(profile.Mode)
|
||||
return &profile, nil
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
apiv1 "github.com/boojack/shortify/api/v1"
|
||||
"github.com/boojack/shortify/server/profile"
|
||||
"github.com/boojack/shortify/store"
|
||||
apiv1 "github.com/boojack/slash/api/v1"
|
||||
"github.com/boojack/slash/server/profile"
|
||||
"github.com/boojack/slash/store"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
@ -52,7 +52,7 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
|
||||
embedFrontend(e)
|
||||
|
||||
// In dev mode, we'd like to set the const secret key to make signin session persistence.
|
||||
secret := "shortify"
|
||||
secret := "slash"
|
||||
if profile.Mode == "prod" {
|
||||
var err error
|
||||
secret, err = s.getSystemSecretSessionName(ctx)
|
||||
|
Reference in New Issue
Block a user