rebrand: MangaBM → BookmarkManager, add novel library support #15
+1
-1
@@ -12,7 +12,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
const testToken = "s3cret-token"
|
const testToken = "s3cret-token"
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
module mangabm/backend
|
module bookmarkmanager/backend
|
||||||
|
|
||||||
go 1.26
|
go 1.26
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler serves the userscript-facing JSON bookmark API.
|
// Handler serves the userscript-facing JSON bookmark API.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Fetcher retrieves a series page. It exists as an interface so tests can inject
|
// Fetcher retrieves a series page. It exists as an interface so tests can inject
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newTestStore opens a fresh SQLite store in a temp dir.
|
// newTestStore opens a fresh SQLite store in a temp dir.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// latestChapter is the newest chapter a series page advertises.
|
// latestChapter is the newest chapter a series page advertises.
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CookieName = "mangabm_session"
|
CookieName = "bmgr_session"
|
||||||
// 60 days: long enough that a phone stays logged in between reading spells.
|
// 60 days: long enough that a phone stays logged in between reading spells.
|
||||||
sessionTTL = 60 * 24 * time.Hour
|
sessionTTL = 60 * 24 * time.Hour
|
||||||
// Domain separation, so the session key can never collide with any other
|
// Domain separation, so the session key can never collide with any other
|
||||||
// use of the secrets it is derived from. Changing this string logs
|
// use of the secrets it is derived from. Changing this string logs
|
||||||
// everyone out.
|
// everyone out.
|
||||||
sessionKeyPurpose = "mangabm-web-session-v1"
|
sessionKeyPurpose = "bmgr-web-session-v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Key derives the cookie-signing key from both secrets. Sessions are
|
// Key derives the cookie-signing key from both secrets. Sessions are
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/session"
|
"bookmarkmanager/backend/internal/session"
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed templates
|
//go:embed templates
|
||||||
|
|||||||
+6
-6
@@ -12,12 +12,12 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/api"
|
"bookmarkmanager/backend/internal/api"
|
||||||
"mangabm/backend/internal/httpmw"
|
"bookmarkmanager/backend/internal/httpmw"
|
||||||
"mangabm/backend/internal/latest"
|
"bookmarkmanager/backend/internal/latest"
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
"mangabm/backend/internal/userscript"
|
"bookmarkmanager/backend/internal/userscript"
|
||||||
"mangabm/backend/internal/web"
|
"bookmarkmanager/backend/internal/web"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config holds all runtime settings, sourced from environment variables.
|
// Config holds all runtime settings, sourced from environment variables.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLoadLatestPollDefaults(t *testing.T) {
|
func TestLoadLatestPollDefaults(t *testing.T) {
|
||||||
|
|||||||
+3
-3
@@ -11,9 +11,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mangabm/backend/internal/session"
|
"bookmarkmanager/backend/internal/session"
|
||||||
"mangabm/backend/internal/store"
|
"bookmarkmanager/backend/internal/store"
|
||||||
"mangabm/backend/internal/web"
|
"bookmarkmanager/backend/internal/web"
|
||||||
)
|
)
|
||||||
|
|
||||||
const testPassword = "hunter2"
|
const testPassword = "hunter2"
|
||||||
|
|||||||
Reference in New Issue
Block a user