refactor: consolidate packages - move output to cmd, config/session to store, rename Store to GraphStore
This commit is contained in:
@@ -2,6 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"axolotl/models"
|
||||
"axolotl/store"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
@@ -40,7 +41,7 @@ func (c *apiClient) do(method, path string, body any) (*http.Response, error) {
|
||||
// setAuth attaches either a Bearer token (when a session exists) or the
|
||||
// X-Ax-User header (no session / non-OIDC servers).
|
||||
func (c *apiClient) setAuth(req *http.Request) error {
|
||||
sess, err := LoadSession()
|
||||
sess, err := store.LoadSession()
|
||||
if err != nil || sess == nil || sess.Token == "" {
|
||||
req.Header.Set("X-Ax-User", c.user)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user